This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
xg:chains [2019-11-26 08:58] – [XG chains] skyjake | xg:chains [2019-11-26 18:19] (current) – [Sector Type Chains] skyjake | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== XG chains ====== | ||
+ | |||
+ | |||
+ | A single [[xg: | ||
+ | |||
+ | Note that the activator of each line type in the chain is that which triggered the initial event. | ||
+ | |||
+ | Another example could be a door closing automatically after a given amount of time has passed. The door line type's activation chain would move the ceiling of the tagged sector to some reasonable height, like to the lowest adjacent ceiling height with an offset of –4. The deactivation chain could alternatively move the ceiling back to its original height or move it to the same height with the floor of the sector, thus closing the door. | ||
+ | |||
+ | |||
+ | ===== Available chains ===== | ||
+ | |||
+ | |||
+ | ^ Name^ Actioned | | ||
+ | | Activation (Act.)| When a trigger line type is [[xg_line_activation|activated]]. | | ||
+ | | Deactivation (Deact.)| When a trigger line type is [[xg_line_activation|deactivated]]. | | ||
+ | | Event| When a trigger line type receives an event. | | ||
+ | |||
+ | |||
+ | As an example let's say that a triggered line type has the activation chain **5120**. Upon activation a chain event will occur which is first sent down the activation chain **before** any function or actions on the triggered line type are executed. | ||
+ | |||
+ | //Event// chains work a bit differently. Events sent to the triggered line type will first be processed treating the trigger line type as if it were of the type specified by the chain. If the event passes (i.e., it meets the [[xg: | ||
+ | |||
+ | |||
+ | ===== Sector Type Chains ===== | ||
+ | |||
+ | |||
+ | Each [[xg: | ||
+ | |||
+ | Each chain can be configured to only affect certain types of things (player, monster, missile, etc.). Also, each chain has a start time and an end time, which define when the chain is operating. The rate at which to send the Chain events can be set as a min/max interval pair. Each chain has a counter that can be used to limit the number of times the chain can be processed. If the counter is greater than zero, it will be decremented every time a Chain event is successfully processed. | ||
+ | |||
+ | The chains can be configured to send activating or deactivating events. Internally, this means the temporary line that receives the events is initially inactive or active, respectively. The temporary line is set up as follows: it is a one-sided line, whose front sector is the sector the chain belongs to. It has no sidedefs, so operations that modify the sides of the line (Act texture, for instance) have no effect. The line's type is equal to the chain being processed (for example 5210). The line's tag number is equal to the sector' | ||
+ | |||
+ | As an example, a sector type that deals one point of damage to all players inside the sector once per second would be set up in the following way. The floor chain would be a line type that, when activated, deals a point of damage to its activator. Flags for the floor chain would be scef_player_a, | ||
+ | |||
+ | |||
+ | |||