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

Events/RA2YR

From ModEnc
Revision as of 12:47, 13 September 2006 by DCoder (talk | contribs) (Created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

The following Events are available:

Code 1 Event Meaning
0 None No Event - cannot be activated
1 Entered by House P24 enters attached building/celltag
2 Spied by House P2 sends a spy into attached building
3 Thieved by Doesn't work
4 Discovered by player House owning the attached object is discovered by the player
5 House Discovered House P2 is discovered by the player
6 Attacked by anybody Attached object is attacked by anybody
7 Destroyed by anybody Attached object is destroyed by anybody
8 Any event Any event
9 Destroyed, Units, All All units of house P2 are destroyed (does not include civilian objects owned by P2)
10 Destroyed, Buildings, All All buildings of house P2 are destroyed (does not include civilian objects owned by P2)
11 Destroyed, All All objects of house P2 are destroyed (does not include civilian objects owned by P2)
12 Credits exceed HOUSE2 has at least P2 credits
13 Elapsed time (1/10th min) (P2/10) minutes have passed in this mission
14 Mission timer expired Mission timer expired
15 Destroyed, Buildings, # Exactly P2 buildings owned by HOUSE have been destroyed (does include civilian objects owned by P2)
16 Destroyed, Units, # Exactly ExP2 units owned by HOUSE have been destroyed (does include civilian objects owned by P2)
17 No factories left HOUSE has no buildings with a valid Template:TTL set
18 Civilians evacuated Civilian objects owned by HOUSE have left the map (See Template:TTL )
19 Build building type Building whose internal index6 is P2 is placed on the map
20 Build unit type Unit whose internal index is P2 is placed on the map
21 Build infantry type Infantry whose internal index is P2 is placed on the map
22 Build aircraft type Aircraft whose internal index is P2 is placed on the map
23 Leaves map (team) TeamType with index P13 leaves the map
24 Zone entry by Attached celltrigger's zone entered by house P2
25 Crosses horizontal line House P2 crosses the horizontal line of the attached celltag
26 Crosses vertical line House P2 crosses the vertical line of the attached celltag
27 Global is set Global variable with index P2 is set
28 Global is clear Global variable with index P2 is cleared
29 Destroyed, Fakes, All Doesn't work, fires immediately
30 Low power House P2 is in a low power situation
31 All bridges destroyed Attached bridge destroyed
32 Building exists HOUSE owns a building with internal number P2
33 Selected by player attached object is selected by the player (single-player only)
34 Comes near waypoint... HOUSE approaches specified waypoint
35 Enemy In Spotlight... enemy unit enters the spotlight cast by the attached building
36 Local is set... local with index P2 is turned on
37 Local is clear... local with index P2 is turned off.
38 First damaged (combat only) attached object suffering first damage from combat damage from combat damage only
39 Half health (combat only) attached object damaged to half health from combat damage only
40 Quarter health (combat only) attached object damaged to quarter health from combat damage only.
41 First damaged (any source) attached object first suffering from combat damage from any source.
42 Half health (any source) attached object damaged to half health from any source
43 Quarter health (any source) attached object damaged to quarter health from any source
44 Attacked by (house)... attached object attacked by some unit of house P2
45 Ambient light below ambient light drops below a certain percentage (P2)
46 Ambient light above ambient light rises above a certain percentage (P2)
47 Elapsed Scenario Time When exactly P2 seconds have elapsed since start of scenario
48 Destroyed by anything attached object destroyed by anything
49 Pickup Crate crate is picked up by the attached object
50 Pickup Crate (any) crate picked up by any unit
51 Random delay... Delays a random time between 50 and 150 percent of time specified in P2 (frames)
52 Credits below... HOUSE owns less than P2 credits
53 Spy entering as House... a spy disguised as house P2 enters attached object
54 Spy entering as Infantry... a spy disguised as infantry index P2 enters the attached object
55 Destroyed Units, Naval... all naval units of house P2 have been destroyed
56 Destroyed Units, Land... all land units of house P2 have been destroyed
57 Building does not exist the building index P2 (owned by HOUSE) does not exist on the map
58 Power Full... house P2's power is at 100%.
59 Entered or Overflown By... Objects owned by house P2 move over the attached cell
60 TechType Exists At least this many (P2) buildings (ID P35) exist on the map
Takes 3 parameters
61 TechType does not Exist there are no buildings (ID P35) on the map
Takes 3 parameters

Events take two unsigned integers (third parameter - string - is necessary for some events) 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 HOUSE in this document refers to the house owning the Trigger, labeled "HOUSE" in the Triggers page.

3 P1 in this document refers to the trigger's first parameter.

4 P2 in this document refers to the trigger's second parameter.

5 P3 in this document refers to the trigger's third (optional) parameter.

6 Internal indexes of RA2/YR objects are listed here.