User Tools

Site Tools


xg:class:chain_sequence

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
xg:class:chain_sequence [2019-11-26 09:01] – [Parameters] skyjakexg:class:chain_sequence [2019-11-26 09:01] (current) – [Parameters] skyjake
Line 1: Line 1:
 +====== Chain sequence (XG class) ======
 +
 +<code>Class = chain_sequence
 +</code>
 +A chain sequence can be used to chain many different [[xg:line type]]s (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 [[xg: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 [[xg:chain events]] will be an activating event.
 +
 +
 +===== Parameters =====
 +
 +^ 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 |
 +
 +
 +
 +===== Example =====
 +
 +  
 +  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)
 +
 +