ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
Events/TSFS: Difference between revisions
< Events
Updated some descriptions. |
No edit summary |
||
Line 10: | Line 10: | ||
! style="text-align: center;" colspan=2 | Parameter types | ! style="text-align: center;" colspan=2 | Parameter types | ||
|- style="background: #ddd; border: 1px solid #000; border-width: 1px 0;" | |- style="background: #ddd; border: 1px solid #000; border-width: 1px 0;" | ||
! style="width: 6em; text-align: center;" | #1 (P1) | ! style="width: 6em; text-align: center;" | #1 (P1){{Fnl|2}} | ||
! style="width: 6em; text-align: center;" | #2 (P2) | ! style="width: 6em; text-align: center;" | #2 (P2) | ||
|- | |- | ||
Line 102: | Line 102: | ||
| style="text-align: center;" | credits | | style="text-align: center;" | credits | ||
|- | |- | ||
| colspan=4 | HOUSE{{Fnl| | | colspan=4 | HOUSE{{Fnl|3}} has at least P2 credits | ||
|- | |- | ||
| rowspan=2 | {{Tt|13}} | | rowspan=2 | {{Tt|13}} | ||
Line 158: | Line 158: | ||
| style="text-align: center;" | Building# | | style="text-align: center;" | Building# | ||
|- | |- | ||
| colspan=4 | Building whose internal index{{Fnl| | | colspan=4 | Building whose internal index{{Fnl|4}} is P2 is placed on the map | ||
|- | |- | ||
| rowspan=2 | {{Tt|20}} | | rowspan=2 | {{Tt|20}} | ||
Line 183: | Line 183: | ||
| rowspan=2 | {{Tt|23}} | | rowspan=2 | {{Tt|23}} | ||
| {{Tt|Leaves map (team)}} | | {{Tt|Leaves map (team)}} | ||
| style="text-align: center;" | | | style="text-align: center;" | 1 | ||
| style="text-align: center;" | TeamType | | style="text-align: center;" | TeamType | ||
|- | |- | ||
Line 433: | Line 433: | ||
{{Fn|1|This column specifies the code to be written in the Event's "condition" slot, e.g. E1 in the [[Maps/Events#TS.2FFS|Events]] page.}} | {{Fn|1|This column specifies the code to be written in the Event's "condition" slot, e.g. E1 in the [[Maps/Events#TS.2FFS|Events]] page.}} | ||
{{Fn|2|HOUSE in this document refers to the house owning the Trigger, labeled "HOUSE" in the [[Maps/Triggers#TS.2FFS|Triggers]] page.}} | {{Fn|2|P1 is a [[boolean]] variable, which denotes whether P2 refers to a [[TeamType]] (value 1) or not (value 0).}} | ||
{{Fn|3|HOUSE in this document refers to the house owning the Trigger, labeled "HOUSE" in the [[Maps/Triggers#TS.2FFS|Triggers]] page.}} | |||
{{Fn|4|See [[ScriptActions#Notes|ScriptActions→Notes]] for more information}} | |||
{{:Maps/Referencing}} | {{:Maps/Referencing}} | ||
[[Category:Map_Information]] | [[Category:Map_Information]] |
Revision as of 21:47, 20 September 2019
In TS, Events become a separate section, so Triggers can have multiple Events with up to two parameters. The game assumed the Trigger, Event and Action all share the same ID. So a Trigger which has ID 12451245 uses the Event list with ID 12451245.
The following Events are available:
Code 1 | Event | Parameter types | |
---|---|---|---|
#1 (P1)2 | #2 (P2) | ||
0 | None | 0 | 0 |
No Event - cannot be activated | |||
1 | Entered by | 0 | House# |
House P2 enters attached building/celltag | |||
2 | Spied by | 0 | House# |
House P2 sends a spy into attached building | |||
3 | Thieved by | 0 | 0 |
Doesn't work | |||
4 | Discovered by player | 0 | 0 |
The attached object is discovered by the player | |||
5 | House Discovered | 0 | House# |
House P2 is discovered by the player | |||
6 | Attacked by enemy | 0 | 0 |
Attached object is attacked by enemy fire. Incidental damage and friendly fire are ignored. | |||
7 | Destroyed by enemy | 0 | 0 |
Attached object is destroyed by enemy fire. Incidental damage and friendly fire are ignored. See also Events 29 and 48. | |||
8 | Any event | 0 | 0 |
Any event | |||
9 | Destroyed, Units, All | 0 | House# |
All units of house P2 are destroyed (does not include civilian objects) | |||
10 | Destroyed, Buildings, All | 0 | House# |
All buildings of house P2 are destroyed (does not include civilian objects) | |||
11 | Destroyed, All | 0 | House# |
All objects of house P2 are destroyed (does not include civilian object) | |||
12 | Credits exceed | 0 | credits |
HOUSE3 has at least P2 credits | |||
13 | Elapsed time | 0 | time |
(P2/10) minutes have passed in this mission | |||
14 | Mission timer expired | 0 | 0 |
Mission timer expired | |||
15 | Destroyed, Buildings, # | 0 | counter |
Exactly P2 buildings owned by HOUSE have been destroyed (does include civilian objects) | |||
16 | Destroyed, Units, # | 0 | counter |
Exactly P2 units owned by HOUSE have been destroyed (does include civilian objects) | |||
17 | No factories left | 0 | 0 |
HOUSE has no structures with valid Factory set | |||
Code 1 | Event | Parameter types | |
#1 (P1) | #2 (P2) | ||
18 | Civilians evacuated | 0 | 0 |
Civilian objects owned by HOUSE have left the map (See CivEvac ) | |||
19 | Build building type | 0 | Building# |
Building whose internal index4 is P2 is placed on the map | |||
20 | Build unit type | 0 | Unit# |
Unit whose internal index is P2 is placed on the map | |||
21 | Build infantry type | 0 | Infantry |
Infantry whose internal index is P2 is placed on the map | |||
22 | Build aircraft type | 0 | Aircraft# |
Aircraft whose internal index is P2 is placed on the map | |||
23 | Leaves map (team) | 1 | TeamType |
TeamType with index P1 leaves the map | |||
24 | Zone entry by | 0 | House# |
Attached CellTag's zone entered by house P2. Zones are continuous areas bounded by cliffs and other impassable terrain. | |||
25 | Crosses horizontal line | 0 | House# |
House P2 crosses the horizontal line of the attached CellTag | |||
26 | Crosses vertical line | 0 | House# |
House P2 crosses the vertical line of the attached CellTag | |||
27 | Global is set | 0 | Global# |
Global variable with index P2 is set | |||
28 | Global is clear | 0 | Global# |
Global variable with index P2 is cleared | |||
29 | Captured or destroyed | 0 | 0 |
Attached object is captured or destroyed by anything. See also Events 7 and 48. | |||
30 | Low power | 0 | House# |
House P2 is in a low power situation | |||
31 | Attached bridge destroyed | 0 | 0 |
Attached bridge destroyed. To link a trigger to a bridge, place the CellTag under any of the bridge overlays. | |||
32 | Building exists | 0 | Building# |
HOUSE owns a building with internal number P2 | |||
33 | Selected by player | 0 | 0 |
Attached object is selected by the player (single-player only) | |||
34 | Comes near waypoint | 0 | Waypoint# |
HOUSE approaches waypoint P2 | |||
35 | Enemy In Spotlight | 0 | 0 |
Enemy unit enters the spotlight cast by the attached building | |||
Code 1 | Event | Parameter types | |
#1 (P1) | #2 (P2) | ||
36 | Local is set | 0 | Local# |
Local with index P2 is set | |||
37 | Local is clear | 0 | Local# |
Local with index P2 is cleared | |||
38 | First damaged (combat only) | 0 | 0 |
Attached object suffering first damage from combat damage from combat damage only | |||
39 | Half health (combat only) | 0 | 0 |
Attached object damaged to half health from combat damage only | |||
40 | Quarter health (combat only) | 0 | 0 |
Attached object damaged to quarter health from combat damage only. | |||
41 | First damaged (any source) | 0 | 0 |
Attached object first suffering from combat damage from any source. | |||
42 | Half health (any source) | 0 | 0 |
Attached object damaged to half health from any source | |||
43 | Quarter health (any source) | 0 | 0 |
Attached object damaged to quarter health by any source | |||
44 | Attacked by (house) | 0 | House# |
Attached object attacked by some unit of house P2 | |||
45 | Ambient light below | 0 | 0 |
Ambient light drops below a certain percentage (P2 %) | |||
46 | Ambient light above | 0 | 0 |
Ambient light rises above a certain percentage (P2 %) | |||
47 | Elapsed Scenario Time | 0 | time |
Exactly P2 seconds have elapsed since start of scenario | |||
48 | Captured, Destroyed or Infiltrated | 0 | 0 |
Attached object is captured, destroyed, or it successfully infiltrates another object. See also Events 7 and 29. | |||
49 | Pickup Crate | 0 | 0 |
Crate is picked up by the attached object | |||
50 | Pickup Crate (any) | 0 | 0 |
Crate picked up by any unit | |||
51 | Random delay... | 0 | time |
Delays a random time between 50 and 150 % of time specified in P2 (frames) | |||
52 | Credits below... | 0 | credits |
HOUSE owns less than P2 credits | |||
53 | Player under EMP effect | 0 | 0 |
HOUSE is under EMP effect | |||
54 | Unknown purpose | 0 | 0 |
Same as event 35. FS/2.x patched only | |||
55 | Attached object bugged | 0 | 0 |
Attached object is infected by a Limpet Drone FS/2.x patched only | |||
Code 1 | Event | Parameter types | |
#1 (P1) | #2 (P2) |
Events take two unsigned integers as parameters, which default to 0.
Notes
1 ↑ This column specifies the code to be written in the Event's "condition" slot, e.g. E1 in the Events page.
2 ↑ P1 is a boolean variable, which denotes whether P2 refers to a TeamType (value 1) or not (value 0).
3 ↑ HOUSE in this document refers to the house owning the Trigger, labeled "HOUSE" in the Triggers page.
4 ↑ See ScriptActions→Notes for more information
- Referencing items
- As you probably noticed, some of the Parameter descriptions in this table end with "#". The reason for that is:
- Some parameters take their values to be indexes of objects, others assume they are the identifiers of those objects.
- For convenience, if the parameter's description in the table ends with a "#" symbol, you should use the object's index in its appropriate list, otherwise you should use its ID.
- Also note: All entries in column P7 are expected to be literal, so you have to convert all the numbers into letters like this:
- 0 is "A", 1 is "B", 25 is "Z", 26 is "AA", just like the columnm numbering in your favourite spreadsheet program.