ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Events/RA2YR: Difference between revisions

From ModEnc
Jump to navigation Jump to search
cleaner, more readable table layout
m Correct the entered info for multiplayer
 
(10 intermediate revisions by 7 users not shown)
Line 2: Line 2:




{| style="width: 100%;" align="center" class="table_descrow"
{| style="width: 100%;" align="center" class="wikitable table_descrow"
|+ '''List of available Map Events'''
|+ '''List of available Map Events'''
|- style="border-bottom-style: hidden;"
|- style="border-bottom-style: hidden;"
Line 30: Line 30:
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | House P2 enters attached building/celltag
| style="border-top-style: hidden; padding-left: 3em;" | House P2 enters attached building/celltag.
'''Caution: on multiplayer, if house P2 is a country (America, Yuri etc) it only detects the first player that is the given house. Additionally, color seems to play a role in this (confirmation needed). Therefore, you may want to use -1 (anyone) as house.'''{{Fnl|4}}
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 63: Line 64:
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | House owning the attached object is discovered by the player
| style="border-top-style: hidden; padding-left: 3em;" | House owning the attached object is discovered by the player.
'''Editor's note:''' this event is irreversibly bugged for the remainder of the mission if the attached objects are discovered by non-convential means like Player building a {{f|SpySat|yes|link}} or the objects getting revealed due to their weapon having {{f|RevealOnFire|yes|link}}; only a mission restart fixes it. It hasn't been researched if reveal via crates or map triggers has the same effect; exercise caution using this event and try using events 1 (TS/RA2/YR) or 59 (YR) instead.
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 75: Line 77:
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | House P2 is discovered by the player
| style="border-top-style: hidden; padding-left: 3em;" | House P2 is discovered by the player
'''Editor's note:''' this event might be bugged too, see above.
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 214: Line 217:
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | HOUSE has no buildings with a valid {{TTL|Factory}} set
| style="border-top-style: hidden; padding-left: 3em;" | HOUSE has no buildings with a valid {{f|Factory|link}} set
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 225: Line 228:
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | Civilian objects owned by HOUSE have left the map (See {{TTL|CivEvac}} )
| style="border-top-style: hidden; padding-left: 3em;" | Civilian objects owned by HOUSE have left the map (See {{f|CivEvac|link}} )
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 276: Line 279:
| rowspan="2" style="border-right: 1px solid #aaaaaa; text-align: center; vertical-align: top;" | {{Tt|23}}
| rowspan="2" style="border-right: 1px solid #aaaaaa; text-align: center; vertical-align: top;" | {{Tt|23}}
| style="padding-left: 3px;" | {{Tt|Leaves map (team)}}  
| style="padding-left: 3px;" | {{Tt|Leaves map (team)}}  
| style="text-align: center;" | TeamType#
| style="text-align: center;" | 1
| style="text-align: center;" | 0
| style="text-align: center;" | TeamType ID
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | TeamType with index P1 leaves the map
| style="border-top-style: hidden; padding-left: 3em;" | TeamType with ID P2 leaves the map
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 324: Line 327:
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | Global variable with index P2 is set
| style="border-top-style: hidden; padding-left: 3em;" | Global variable with index P2 is set. Takes priority over other events{{fnl|3}}
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 335: Line 338:
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | Global variable with index P2 is cleared
| style="border-top-style: hidden; padding-left: 3em;" | Global variable with index P2 is cleared. Takes priority over other events{{fnl|3}}
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 341: Line 344:
|-
|-
| rowspan="2" style="border-right: 1px solid #aaaaaa; text-align: center; vertical-align: top;" | {{Tt|29}}
| rowspan="2" style="border-right: 1px solid #aaaaaa; text-align: center; vertical-align: top;" | {{Tt|29}}
| style="padding-left: 3px;" | {{Tt|Destroyed, Fakes, All}}  
| style="padding-left: 3px;" | {{Tt|Destroyed by anything (not infiltrate)}}  
| style="text-align: center;" | 0
| style="text-align: center;" | 0
| style="text-align: center;" | 0
| style="text-align: center;" | 0
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | Doesn't work, fires immediately
| style="border-top-style: hidden; padding-left: 3em;" | Attached unit is destroyed, but not when infiltrating
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 431: Line 434:
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | Local variable with index P2 is set
| style="border-top-style: hidden; padding-left: 3em;" | Local variable with index P2 is set. Takes priority over other events{{fnl|3}}
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 442: Line 445:
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | Local variable with index P2 is cleared
| style="border-top-style: hidden; padding-left: 3em;" | Local variable with index P2 is cleared. Takes priority over other events{{fnl|3}}
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 692: Line 695:
| style="text-align: center;" | -  
| style="text-align: center;" | -  
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | Objects owned by house P2 move over the attached cell
| style="border-top-style: hidden; padding-left: 3em;" | Objects owned by house P2 move over the attached cell.
'''Caution: on multiplayer, if house P2 is a country (America, Yuri etc) it only detects the first player that is the given house. Additionally, color seems to play a role in this (confirmation needed). Therefore, you may want to use -1 (anyone) as house.'''{{Fnl|4}}
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 699: Line 703:
| rowspan="2" style="border-right: 1px solid #aaaaaa; text-align: center; vertical-align: top;" | {{Tt|60}}
| rowspan="2" style="border-right: 1px solid #aaaaaa; text-align: center; vertical-align: top;" | {{Tt|60}}
| {{Tt|TechType Exists}}{{yro}}
| {{Tt|TechType Exists}}{{yro}}
| style="text-align: center;" | 0
| style="text-align: center;" | 2
| style="text-align: center;" | counter
| style="text-align: center;" | counter
| style="text-align: center;" | Building ID
| style="text-align: center;" | Techno ID
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | At least this many (P2) buildings (ID=P3) exist on the map
| style="border-top-style: hidden; padding-left: 3em;" | At least this many (P2) technos (ID=P3) exist on the map
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 710: Line 714:
| rowspan="2" style="border-right: 1px solid #aaaaaa; text-align: center; vertical-align: top;" | {{Tt|61}}
| rowspan="2" style="border-right: 1px solid #aaaaaa; text-align: center; vertical-align: top;" | {{Tt|61}}
| {{Tt|TechType does not Exist}}{{yro}}
| {{Tt|TechType does not Exist}}{{yro}}
| style="text-align: center;" | 2
| style="text-align: center;" | 0
| style="text-align: center;" | 0
| style="text-align: center;" | 0
| style="text-align: center;" | Techno ID
| style="text-align: center;" | Building ID
|-
|-
| style="border-top-style: hidden; padding-left: 3em;" | There are no buildings P3 on the map
| style="border-top-style: hidden; padding-left: 3em;" | There are no technos P3 on the map
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
| style="border-top-style: hidden;" |
Line 735: Line 739:


{{Fn|2|HOUSE in this document refers to the house owning the Trigger, labeled "HOUSE" in the [[Maps/Triggers#RA2.2FYR|Triggers]] page.}}
{{Fn|2|HOUSE in this document refers to the house owning the Trigger, labeled "HOUSE" in the [[Maps/Triggers#RA2.2FYR|Triggers]] page.}}
{{Fn|3|By default, events are checked in the order they are listed. However, when using local or global variable checks together with other events, the variable check will reset any preceding events. In other words, the variable check is of higher priority than other events. Only after the variable is set/cleared do other events count towards the execution of the trigger.}}
{{Fn|4|Read: https://forums.cncnet.org/topic/9841-trigger-entered-by-any-house-how-to-make-solved/}}


{{:Maps/Referencing}}
{{:Maps/Referencing}}
[[Category:Map_Information]]

Latest revision as of 14:34, 7 December 2022

Events are a separate section like in TS, so Triggers can have multiple Events with up to two/three parameters. The game assumes the Trigger, Event and Action all share the same ID. So a Trigger which has ID 12451245 uses the Event list with ID 12451245.


List of available Map Events
Code 1 Event Parameter types
#1 (P1) #2 (P2) #3 (P3)
0 None 0 0 -
No Event - cannot be activated
1 Entered by 0 House# -
House P2 enters attached building/celltag.

Caution: on multiplayer, if house P2 is a country (America, Yuri etc) it only detects the first player that is the given house. Additionally, color seems to play a role in this (confirmation needed). Therefore, you may want to use -1 (anyone) as house.4

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 -
House owning the attached object is discovered by the player.

Editor's note: this event is irreversibly bugged for the remainder of the mission if the attached objects are discovered by non-convential means like Player building a SpySat=yes or the objects getting revealed due to their weapon having RevealOnFire=yes; only a mission restart fixes it. It hasn't been researched if reveal via crates or map triggers has the same effect; exercise caution using this event and try using events 1 (TS/RA2/YR) or 59 (YR) instead.

5 House Discovered 0 House# -
House P2 is discovered by the player

Editor's note: this event might be bugged too, see above.

6 Attacked by anybody 0 0 -
Attached object is attacked by anybody
7 Destroyed by anybody 0 0 -
Attached object is destroyed by anybody
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 objects)
12 Credits exceed 0 credits -
HOUSE2 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)
Code 1 Event Parameter types
#1 (P1) #2 (P2) #3 (P3)
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 buildings with a valid Factory set
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 index 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 ID -
TeamType with ID P2 leaves the map
24 Zone entry by 0 House# -
Attached celltrigger's zone entered by house P2
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. Takes priority over other events3
28 Global is clear 0 Global# -
Global variable with index P2 is cleared. Takes priority over other events3
29 Destroyed by anything (not infiltrate) 0 0 -
Attached unit is destroyed, but not when infiltrating
30 Low power 0 House# -
House P2 is in a low power situation
Code 1 Event Parameter types
#1 (P1) #2 (P2) #3 (P3)
31 All bridges destroyed 0 0 -
Attached bridge destroyed
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
36 Local is set... 0 Local# -
Local variable with index P2 is set. Takes priority over other events3
37 Local is clear... 0 Local# -
Local variable with index P2 is cleared. Takes priority over other events3
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 from any source
44 Attacked by (house)... 0 House# -
Attached object attacked by some unit of house P2
45 Ambient light below 0 number -
Ambient light drops below a certain percentage (P2%)
Code 1 Event Parameter types
#1 (P1) #2 (P2) #3 (P3)
46 Ambient light above 0 number -
Ambient light rises above a certain percentage (P2%)
47 Elapsed Scenario Time 0 time -
Exactly P2 seconds have elapsed since start of scenario
48 Destroyed by anything 0 0 -
Attached object destroyed by anything
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 -
Fires after a random time between 50 and 150 % of time specified in P2 (frames) elapses since trigger was enabled
52 Credits below... 0 credits -
HOUSE owns less than P2 credits
53 Spy entering as House... 0 House# -
A spy disguised as house P2 enters attached object
54 Spy entering as Infantry... 0 Infantry# -
A spy disguised as infantry index P2 enters the attached object
55 Destroyed Units, Naval... 0 House# -
All naval units of house P2 have been destroyed
56 Destroyed Units, Land... 0 House# -
All land units of house P2 have been destroyed
57 Building does not exist 0 Building# -
No buildings with index P2 (owned by HOUSE) exist on the map
58 Power Full... 0 House# -
House P2's power is at 100%.
59 Entered or Overflown By... 0 House# -
Objects owned by house P2 move over the attached cell.

Caution: on multiplayer, if house P2 is a country (America, Yuri etc) it only detects the first player that is the given house. Additionally, color seems to play a role in this (confirmation needed). Therefore, you may want to use -1 (anyone) as house.4

60 TechType Exists 2 counter Techno ID
At least this many (P2) technos (ID=P3) exist on the map
61 TechType does not Exist 2 0 Techno ID
There are no technos P3 on the map
Code 1 Event Parameter types
#1 (P1) #2 (P2) #3 (P3)

Events take two parameters (third parameter - string - is needed for events #60 and #61), 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 HOUSE in this document refers to the house owning the Trigger, labeled "HOUSE" in the Triggers page.

3 By default, events are checked in the order they are listed. However, when using local or global variable checks together with other events, the variable check will reset any preceding events. In other words, the variable check is of higher priority than other events. Only after the variable is set/cleared do other events count towards the execution of the trigger.

4 Read: https://forums.cncnet.org/topic/9841-trigger-entered-by-any-house-how-to-make-solved/

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.