User Tools

Site Tools


Chain sequence (XG class)

Class = chain_sequence

A chain sequence can be used to chain many different line_types (of any class) behind one line. For example, using a chain sequence it is possible to have a switch in your level that opens a door, dims the lights and lowers a lift all at the same time, or at timed intervals.

A special line class that sends chain events to a copy of itself while active. This allows lines that perform a timed sequence of actions. If the line is deactivated the processing of the chain sequence is stopped. Each of the chain events will be an activating event.


Prm Name Type Meaning
Ip0 Chain Flags Flags * chsf_done_d disables the line after the chain sequence has been completed. * chsf_loop makes the sequence loop continuously.
Ip1‚Ip2,…Ip19 Line Type 0…18 Integers List of chains. ID numbers of line types. A zero ends the list. For example: Ip1 = 1002 Ip2 = 1004 Ip3 = 1010
Fp0 Float Randomness of intervals, in percents. A value of 100 means the actual interval of two chains is 0%…200% of the defined interval.
Fp1‚Fp2,…Fp19 Floats List of intervals, in seconds. They define the number of seconds to wait before processing the corresponding Chain event. For example, if Fp1 is 2 and Ip1 is 5210, the chain 5210 is processed two seconds after the activation of the chain sequence. For example: Fp1 = 1.5 Fp2 = 3 Fp3 = 10.35


Line Type {
  ID = 9000
  Class = chain_sequence
  Flags = player_cross
  Flags2 = when_act | any
  Time = -1
  Count = 1
  Chain Flags = done_d
  Line Type 0 = 9002
  Line Type 1 = 9003
  Line Type 2 = 0
  Fp1 = 1
  Fp2 = 3

The line can only be activated by the player crossing it (Flags = player_cross), the line can be triggered in any game mode, and any skill setting (Flags2 = any). The line carrys out it's effect when activated (Flags2 = when_act). Once activated it waits 1 second (Fp1 = 1) before sending a chain event to Line ID 9002 (Ip1). Then after three seconds (Fp2 = 3) it sends a chain event to Line ID 9003 (Ip2). There are now no more lines to be triggered (Ip3 = 0) so it waits till the lines it has triggered have finished whatever they are doing (Ip0 = done_d) before deactivating itself. The Line can only be activated once (Count = 1)

xg/class/chain_sequence.txt · Last modified: 2017-03-17 12:11 by skyjake