β WAC triggers
Every condition Joint Ops' WAC compiler knows: the things you can test after IF, AND, OR and NOT. Generated from the game's own command table, with what each one does and how sure we are.
How to read a command card
- Use it like: one example line.
- Takes: what goes between the brackets, in order.
- Multiplayer: whether it works on a multiplayer server, as far as we know.
- Tested in a match (13 Oct): what happened when we fired it on a real host with a player joined (see the live test).
- How sure are we: "Traced in the game's code" means the FMJ / OpenNova team followed what the game does with it; "not tried in a match yet" means nobody has confirmed it in a real game. If you test one, tell us in TAC Mappers HQ and the card gets updated.
Triggers are only tested on the server (the host runs the map's script), so "sent to players" does not apply to them.
51 triggers: elapse · never · previous · chain · past · before · ontick · groupdead · groupalive · dooropen · SSNcritical · SSNexists · SSNdead · SSNalive · SSNwounded · SSNride · SSNonSSN · SSNnearSSN · SSNlosSSN · SSNseesSSN · SSNarea · SSNarea3D · SSNloc · SSNLeadSSN2SSN · squadevent · random · outside · location · area · area3D · waveready · weaponfired · event · meride · meattached · medrive · meongun · eq · ne · lt · gt · le · ge · true · false · onptick · pisgold · IsPSPallteam · piskills · pisvar · pisteam
All triggers, A to Z
area
True when your own player is inside an area (flat check).
| Tested in a match (13 Oct) | works (host only - players do not see it) - G180 = 1 as soon as it was armed (host player in area 12). Checks the host's own player only; in MP use SSNarea(player, N) in PLOOP. |
|---|---|
| Use it like | if area(3) and never then text("Checkpoint") endif |
| Takes | area an area: the zone ID you gave the area in MED/Nile |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | For every player in MP use PLOOP with SSNarea(player, N) instead. High confidence. |
area3D
Same as area but also checks the area's height.
| Tested in a match (13 Oct) | works (host only - players do not see it) - G181 = 1 as soon as it was armed. Host's own player only. |
|---|---|
| Use it like | if area3d(3) and never then text("Roof reached") endif |
| Takes | area an area: the zone ID you gave the area in MED/Nile |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | For MP use PLOOP with SSNarea3D(player, N). High confidence. |
before
True while fewer than N seconds have passed since the mission started.
| Tested in a match (13 Oct) | works (host + players) - G138 1 -> 2 at 60 s, same pass as past. Works. |
|---|---|
| Use it like | if before(120) and ssndead(500) and never then text("Fast work!") endif |
| Takes | seconds seconds |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Opposite of past. High confidence. |
chain
Like previous, but waits N seconds after the IF before it fired. A row of 'if chain(N) then ... endif' blocks makes a timed sequence.
| Tested in a match (13 Oct) | works (host + players) - G135 set at ~50 s; G136 = 1 about 7 s later and stayed 1. Works. |
|---|---|
| Use it like | if chain(5) and never then killssn(3404) endif |
| Takes | seconds seconds |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Same rules as previous (looks at the IF before it at the same level; ignores a firing on the very first pass). High confidence. |
dooropen
True when the first door of a door group is fully open.
| Tested in a match (13 Oct) | inconclusive - G206 stayed 0 for the whole run (opendoors(16) ran at s124). No doors on 03TR: negative only. |
|---|---|
| Use it like | if dooropen(7) and never then text("The bunker is open") endif |
| Takes | number a door group number (the group number set on the building) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Only the FIRST matching door is checked; another open door in the group does not count. Buildings only. High confidence. |
elapse
True if this IF has never fired, or if at least N seconds have passed since it last fired. Use it to repeat something every N seconds.
| Tested in a match (13 Oct) | works (host + players) - G131 = 1 at ~31-33 s, then +1 about every 20 s (seen at 16-23 s intervals because of the driver blind window); 9 at the end, as predicted. Works. |
|---|---|
| Use it like | if past(700) and elapse(700) then text("Map made by onedead") endif |
| Takes | seconds seconds |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | True straight away the first time, so it repeats rather than delays; add past(N) to delay the first time. Seconds are script passes (about 1 s each). High confidence. |
eq
True when the first value is equal to the second.
| Tested in a match (13 Oct) | works (host + players) - G142 = 1 once G160 = 8; eq(3,4) never fired. Reliable. |
|---|---|
| Use it like | if eq(V105, 1) then snow(100, 10) endif |
| Takes | number a number or variable, number a number or variable |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Whole numbers. Same as writing the comparison with < > = in the IF. High confidence. |
event
True while BMS event number N (counting from 0) is active, including during its delay.
| Tested in a match (13 Oct) | works (host + players) - B5: event(9) (players in area 7, no delay) 1 -> 2 after seating and stayed 2; event(115) (mission lost) never true. event(44) (player on 44's gun) stayed false in B1, B3 and B5 although the joiner sat on 44's minigun for 100+ s. Works. BMS event 44 never became active: the joiner on the minigun does not satisfy that event (maybe it needs the host). |
|---|---|
| Use it like | if event(4) and never then wave("radio2.wav") endif |
| Takes | number a BMS event number, first event = 0 |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Counts from 0: the first BMS event is 0. High confidence. |
false
True when the value is 0.
| Tested in a match (13 Oct) | works (host + players) - G149 1 -> 2 when G163 became -1. Reliable. |
|---|---|
| Use it like | if false(V7) then set(V7, 1) endif |
| Takes | number a number or variable |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | High confidence. |
ge
True when the first value is greater than or equal to the second.
| Tested in a match (13 Oct) | works (host + players) - G147: 2 at 8 (boundary), 1 again at -2. Reliable. |
|---|---|
| Use it like | if ge(V105, 1) then snow(100, 10) endif |
| Takes | number a number or variable, number a number or variable |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Whole numbers. Same as writing the comparison with < > = in the IF. High confidence. |
groupalive
True while at least one member of a MED group is alive.
| Tested in a match (13 Oct) | works (host + players) - G112 1 -> 2 after remove(14) and stayed 2. Works. |
|---|---|
| Use it like | if groupalive(4) and elapse(60) then text("Enemy armour still active") endif |
| Takes | number a MED/Nile group number (the group set on placed units), not a G_ script group |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Same once-a-second count as groupdead. Group 0 is never alive. High confidence. |
groupdead
True when no member of a MED group is alive.
| Tested in a match (13 Oct) | works (host + players) - G110 1 -> 2 after kill(13) (within the 5 s driver blind window); back to 1 ~30 s later when the birds respawned. Same in both rounds. Works; wildlife groups do not stay dead. |
|---|---|
| Use it like | if groupdead(3) and never then win(1) endif |
| Takes | number a MED/Nile group number (the group set on placed units), not a G_ script group |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Reads a live count the game refreshes about once a second, so a kill can take up to a second to show. Group 0 always reads as dead. High confidence. |
gt
True when the first value is greater than the second.
| Tested in a match (13 Oct) | works (host + players) - G145 = 1 when G160 became 8. Reliable. |
|---|---|
| Use it like | if gt(V105, 1) then snow(100, 10) endif |
| Takes | number a number or variable, number a number or variable |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Whole numbers. Same as writing the comparison with < > = in the IF. High confidence. |
IsPSPallteam
True when every spawn point belongs to the given team.
| Tested in a match (13 Oct) | inconclusive - G207 stayed 0. No spawn points on 03TR: negative only. |
|---|---|
| Use it like | if IsPSPallteam(1) and never then win(1) endif |
| Takes | number a team number (1 = Blue, 2 = Red) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Filed among actions by the game (kind byte 0x02) but used as a test. Counts all spawn points, even destroyed ones. False when the map has none. High confidence. |
le
True when the first value is less than or equal to the second.
| Tested in a match (13 Oct) | works (host + players) - G146: 1 at 5 (boundary), 2 at 8, 1 again at -2. Reliable. |
|---|---|
| Use it like | if le(V105, 1) then snow(100, 10) endif |
| Takes | number a number or variable, number a number or variable |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Whole numbers. Same as writing the comparison with < > = in the IF. High confidence. |
location
True when your own player is in location number N.
| Tested in a match (13 Oct) | inconclusive - G150 stayed 0 for location(1..6) for the whole run. 03TR has no location boxes: negative only. |
|---|---|
| Use it like | if location(2) and never then text("Entering town") endif |
| Takes | number a location number |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | Updated about every 16 ticks while alive. Medium confidence on how location numbers are set. |
lt
True when the first value is less than the second.
| Tested in a match (13 Oct) | works (host + players) - G144 = 1 when G160 became -2. Reliable; works with negative values. |
|---|---|
| Use it like | if lt(V105, 1) then snow(100, 10) endif |
| Takes | number a number or variable, number a number or variable |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Whole numbers. Same as writing the comparison with < > = in the IF. High confidence. |
meattached
True when your own player is seated on/in the object.
| Tested in a match (13 Oct) | works (host only - players do not see it) - meattached(49) 2 while on gun 49; meattached(29) 2 while in truck 29; both back to 1 after release. The host's own player only. |
|---|---|
| Use it like | if meattached(1323) then ssncspd(1323, 40) endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | High confidence. |
medrive
True when your own player is driving the object.
| Tested in a match (13 Oct) | works (host only - players do not see it) - medrive(29) 1 -> 2 while the host sat in the driver seat of truck 29; medrive(49) (tripod gun) stayed 1 as expected. The host's own player only. |
|---|---|
| Use it like | if medrive(1323) and never then text("Drive to the docks") endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | High confidence. |
meongun
True when your own player is on the object's gun.
| Tested in a match (13 Oct) | works (host only - players do not see it) - meongun(49) 1 -> 2 when the host was seated on grenade launcher 49 (s92), back to 1 after release. The host's own player only. |
|---|---|
| Use it like | if meongun(4137) and never then text("Gunner ready") endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | High confidence. |
meride
True when your own player is standing on the object.
| Tested in a match (13 Oct) | works (host only - players do not see it) - meride(150) = 2 while the host stood on tower building 150 after tele(49) (s44-s92); meride(49) = 2 while seated on gun 49. meride(39) stayed 1 in B4 (tele put him on the ground beside SUV 39, z 3.4). The host's own player only. Sitting on a gun also counts as riding it. |
|---|---|
| Use it like | if meride(1466) and never then text("All aboard") endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | For MP use PLOOP with SSNonSSN(player, N). High confidence. |
ne
True when the first value is not equal to the second.
| Tested in a match (13 Oct) | works (host + players) - G143 1 -> 2 when G160 became 5, stayed 2. Reliable. |
|---|---|
| Use it like | if ne(V105, 1) then snow(100, 10) endif |
| Takes | number a number or variable, number a number or variable |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Whole numbers. Same as writing the comparison with < > = in the IF. High confidence. |
never
True until this IF has fired once. 'if X and never then ... endif' runs its actions only one time.
| Tested in a match (13 Oct) | works (host + players) - G130 = 1 on the load pass and never incremented again. Works (but reset did not re-arm it). |
|---|---|
| Use it like | if ssndead(2426) and never then fx2ssn(Effect_smkSigB, 3344) endif |
| Takes | none |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Belongs to the IF it is in. reset([name]) re-arms it. High confidence. |
onptick
True when the player PLOOP has picked has been in play for exactly N seconds.
| Tested in a match (13 Oct) | works (host + players) - G150 = 1 at ~16 s script time (expected ~20 s after a body is in play; the bodies were already in play on the first passes). Works; the exact start of the count was not pinned down. |
|---|---|
| Use it like | PLOOP if onptick(20) then ptext("Welcome!") endif END |
| Takes | seconds seconds |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Counts the time this player's slot has had a body in play (not hidden). When the count restarts (e.g. rejoin) is not verified. Use it inside PLOOP (it works on the player PLOOP has picked). High confidence. |
ontick
True only on script pass number N, i.e. exactly N seconds after the mission started. OnTick(0) is the first pass, at map load.
| Tested in a match (13 Oct) | works (host + players) - G139 = 1, once, first seen just after the step-3 blind window (consistent with 45 s). Works. |
|---|---|
| Use it like | if never() and (OnTick(0)) then tod(8) fogdist(1024) endif |
| Takes | seconds seconds |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Only one pass matches, so pair it with something that is already true then. The count stops while the server is empty, so later times shift. High confidence. |
outside
True when your own player is not inside a building.
| Tested in a match (13 Oct) | works (host only - players do not see it) - False from 48 s while the host stood in the hangar; became 1 right after fall lifted him out (~61-64 s). Works; host's own player only. On 03TR the players spawn inside a hangar. |
|---|---|
| Use it like | if outside() then rain(100, 5) endif |
| Takes | none |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | High confidence. |
past
True once at least N seconds have passed since the mission started.
| Tested in a match (13 Oct) | works (host + players) - G137 1 -> 2 at 60 s. Works. |
|---|---|
| Use it like | if past(100) and never() then KillSSN(1346) endif |
| Takes | seconds seconds |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Seconds are script passes: the count stops while the server is empty (see the language page). High confidence. |
pisgold
Meant to test for a NovaWorld Gold member. Always false in Joint Operations.
| Tested in a match (13 Oct) | no visible effect (as documented) - Stayed 0. Always false in JO. |
|---|---|
| Use it like | PLOOP if pisgold() then ptext("Hi Gold member") endif END |
| Takes | none |
| Sent to players | No - server only |
| Multiplayer | Does nothing useful in multiplayer or single player (see notes). |
| How sure are we | Traced in the game's code |
| Notes | No-op: nothing in the game ever sets the Gold flag. High confidence. |
piskills
True when the player PLOOP has picked has at least N enemy kills.
| Tested in a match (13 Oct) | works (host + players) - G151 = 1 from the first pass; piskills(1) never fired. Works (only 0 kills tested). |
|---|---|
| Use it like | PLOOP if piskills(10) and not pisvar(1) then ptext("10 kills!") psetvar(1) endif END |
| Takes | number a number (or a variable) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | At least N, not exactly N. Use it inside PLOOP (it works on the player PLOOP has picked). High confidence. |
pisteam
True when the player PLOOP has picked is on the given team.
| Tested in a match (13 Oct) | works (host + players) - G153 = 1 (both players Blue); pisteam(2) never fired. Reliable. |
|---|---|
| Use it like | PLOOP if pisteam(2) and onptick(10) then ptext("Defend the village") endif END |
| Takes | team a team number (1 = Blue, 2 = Red, 0 = neutral/green) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Team numbers 1 = Blue, 2 = Red. Use it inside PLOOP (it works on the player PLOOP has picked). High confidence. |
pisvar
True when flag N (0-16) is set on the player PLOOP has picked (see psetvar).
| Tested in a match (13 Oct) | works (host + players) - G152 0 until psetvar(3), then 1; pisvar(4) never fired. Reliable. |
|---|---|
| Use it like | PLOOP if pisvar(13) and not pisvar(14) then psetvar(14) endif END |
| Takes | number a flag number 0-16 |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Each player has 17 flags (0-16). Use it inside PLOOP (it works on the player PLOOP has picked). High confidence. |
previous
True when the IF just before this one (same nesting level) has fired more recently than this one. Runs a follow-on step straight after the previous IF.
| Tested in a match (13 Oct) | works (host + players) - G133 = 1 at ~40 s and stayed 1; no 9/10 (the pass-0 firing did not count). Works as documented. |
|---|---|
| Use it like | if previous() then flash endif |
| Takes | none |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Fires once for each firing of the IF before it. IFs nested inside that previous IF are skipped when looking back. A previous IF that fired only on the very first pass (second 0) never counts. High confidence. |
random
A random test: true now and then. The roll is stored in RND.
| Tested in a match (13 Oct) | works (host + players) - random(0) set G140 = 1 on the load pass. Only random(0) (always true) was tested; the odds of random(N) were not measured. |
|---|---|
| Use it like | if past(30) and elapse(30) and random(4) then flash endif |
| Takes | number N |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | From the code the chance is about 1 in 2N, not 1 in N: random(4) is true about 1 time in 8, random(1) about half the time, and random(0) always. RND gets a value from 1 to N+1. Traced in code, not measured in game. |
squadevent
Meant to test for a squad event. Nothing in Joint Operations ever creates one, so it is always false.
| Tested in a match (13 Oct) | no visible effect (as documented) - Stayed 0. Always false in JO; do not use. |
|---|---|
| Use it like | if squadevent(1) then text("never shown") endif |
| Takes | number a number (or a variable) |
| Sent to players | No - server only |
| Multiplayer | Does nothing useful in multiplayer or single player (see notes). |
| How sure are we | Traced in the game's code |
| Notes | No-op in practice. High confidence. |
SSNalive
True when the object exists and is not dead.
| Tested in a match (13 Oct) | works (host + players) - G111 1 -> 2 after kill(13); back to 1 ~30 s later when bird 6 respawned. Works. |
|---|---|
| Use it like | if ssnalive(1484) and elapse(30) then ssnwave(1484, "help1.wav", 100) endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Reads the dead flag, not health. Nile's 'SSN NOT Alive' writes !ssnalive(SSN). High confidence. |
SSNarea
True when the object is inside the area (flat check: height is ignored).
| Tested in a match (13 Oct) | works (host + players) - G113 1 from load, 2 on the same poll as teleport moved 1848 out of area 5. Works. |
|---|---|
| Use it like | PLOOP if ssnarea(player, 12) then ptext("You are in the minefield!") endif END |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), area an area: the zone ID you gave the area in MED/Nile |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Use the area's zone ID from MED, not its position in the list. Edges count. Hidden objects never count; dead ones still do. Zone ID 0 never matches; a missing zone is simply false. High confidence. |
SSNarea3D
Same as SSNarea but also checks the area's bottom and top height.
| Tested in a match (13 Oct) | works (host + players) - G114 = 1 from load with PLOOP player in area 12; the area 17 (air) negative never fired. Works with player inside PLOOP. |
|---|---|
| Use it like | if ssnarea3d(4137, 5) and never then text("The helo reached the pad") endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), area an area: the zone ID you gave the area in MED/Nile |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Uses the area's own bottom/top heights even if 'constrain Z' is off. High confidence. |
SSNcritical
True when the object's health is above 0 but at or below its 'critical' level from items.def (about to blow up).
| Tested in a match (13 Oct) | inconclusive - B5: SSNHP(37,300) at s84 made SUV 37 burn (140 hp at s88) and blow up (0 hp, flags 0x406, by s98), so 300 was below its critical level, yet G202 never read 2: the driver only read G at ~s83 and ~s94 and missed the ~7 s window. B4: SUV 39 was shot down to 2966 hp; G183 stayed 1. Probably works (the SUV burned) but the trigger was never caught true. Latch it: if ssncritical(37) then set(Gn,2). |
|---|---|
| Use it like | if ssncritical(4137) and never then text("The helo is going down!") endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Uses the critical threshold of the object's item definition. High confidence. |
SSNdead
True when the object is dead.
| Tested in a match (13 Oct) | works (host + players) - Became true after killssn(1704) (within the driver's 5 s blind window) and became FALSE again ~30 s after the kill, at the moment the body was removed from the pools. Latch it: "if ssndead(X) and never then set(Gn, 1)". A check later than ~30 s after the death reads false. |
|---|---|
| Use it like | if ssndead 404 and ssndead 405 and never then quake 10 flash endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Reads the object's dead flag, not its health: setting health to 0 with SSNHP does not make it count as dead by itself. High confidence. |
SSNexists
True when an object with that SSN exists in the game.
| Tested in a match (13 Oct) | works (host + players) - G102 1 -> 2 on the same poll as removessn(1703). Reliable. Killed soldiers also stop existing once the body is cleaned up (~30 s). |
|---|---|
| Use it like | if not ssnexists(3405) and never then text("The crane control is gone") endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Removed objects stop existing; dead ones still exist. High confidence. |
SSNLeadSSN2SSN
True when the first object is closer to the third (the target) than the second object is, by more than the distance. Checks who is ahead in a race to a point.
| Tested in a match (13 Oct) | works (host + players) - G107 = 1 from load; the swapped negative never fired. Reliable (needs 4 values). |
|---|---|
| Use it like | if ssnleadssn2ssn(1323, 1466, 1468, 20) and never then text("The ATV wins the race") endif |
| Takes | ssn the leader's SSN, ssn the follower's SSN, ssn the target's SSN, distance a lead distance in metres |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Needs 4 values; Nile's 'Unit Lead Unit to Unit' template only writes 3. Dead objects still count. High confidence. |
SSNloc
True when the object is in the given location number (the mission's location boxes; a building's own location number wins).
| Tested in a match (13 Oct) | inconclusive - G151 stayed 0 for ssnloc(88, 1..6). Negative only (no location boxes). |
|---|---|
| Use it like | if ssnloc(1484, 2) and never then text("Target entered the town") endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), number a location number |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | The numbers come from the mission's location/music boxes and the building's items.def; how mappers set them is not verified here. Medium confidence. |
SSNlosSSN
True when the two objects are within the distance AND have a clear line of sight to each other.
| Tested in a match (13 Oct) | works (host + players) - G102 = 1 from load to the end: ssnlosssn(44,46,80) true for the two helos 57 m apart; the 40 m negative never fired (never 9). Positive and negative both as documented. |
|---|---|
| Use it like | if ssnlosssn(500, 501, 100) and never then text("Spotted!") endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), distance a distance in metres (decimals allowed; add F for feet, e.g. 30F) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Up to 20 m the sight check includes objects; beyond that it checks terrain. High confidence. |
SSNnearSSN
True when the two objects' centres are within the distance of each other.
| Tested in a match (13 Oct) | works (host + players) - G104 = 1 from load (50cals 16.7 m apart, test 20 m); the 10 m negative never fired. Reliable. |
|---|---|
| Use it like | if ssnnearssn(1323, 1329, 10) and never() then ssnCspd(1323, 10) endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), distance a distance in metres (decimals allowed; add F for feet, e.g. 30F) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Straight-line 3D distance between centres; exactly at the distance counts. High confidence. |
SSNonSSN
True when the first object is standing on, or being carried by, the second (up to 3 links).
| Tested in a match (13 Oct) | works (host + players) - B1: G100 (host 88) and G101 (joiner 89) went 1 -> 2 after seating on 44 and stayed 2. B3: G139 ssnonssn(88,29) 1 -> 2 while the host sat in truck 29, back to 1 after release. B5: G201 ssnonssn(1750,1714) 1 -> 2 when 1750 was put in Little Bird 1714; stayed 2 after release because he still stood on it. Works with player inside PLOOP (the TAC chair pattern). Standing on the vehicle also counts. |
|---|---|
| Use it like | PLOOP if ssnonssn(player, 133031) then ssn2ssn(player, 133035) ssnuse(player) endif END |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Common in TAC maps inside PLOOP with player as the first SSN. High confidence. |
SSNride
True when a soldier or player is riding in, seated on or standing on the object.
| Tested in a match (13 Oct) | works (host + players) - B3: ssnride(29) 1 -> 2 while the host sat in empty truck 29, back to 1 after release. B5: ssnride(46) 1 -> 2 when 1748 boarded; ssnride(1714) 2 while 1750 was seated (and still 2 after release: he stood on it). Reliable on/off; standing on counts. |
|---|---|
| Use it like | if ssnride(3405) and never then ssnwave(2265, "m1rtrev2.wav", 250) endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | Checks soldiers and players only, follows 'carried by' links up to 3 steps, and ignores dead riders. TAC maps use it for chairs and lifts. High confidence. |
SSNseesSSN
True when the first object is within the distance, has a clear line of sight to the second, and is facing it.
| Tested in a match (13 Oct) | works (host + players) - G105 became 1 at ~89 s, ~5 s after soldier 1847 (standing between 1845 and 1846) walked away; the 3 m negative never fired. Objects blocking under 20 m are real. Works; a soldier standing in the line blocks it. |
|---|---|
| Use it like | if ssnseesssn(500, 501, 150) and never then ssnwave(500, "contact.wav", 100) endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player), distance a distance in metres (decimals allowed; add F for feet, e.g. 30F) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | The facing test is a 30-degree check. Same short/long range sight rules as SSNlosSSN. High confidence. |
SSNwounded
True when the object's health is at or below half of its maximum.
| Tested in a match (13 Oct) | works (host + players) - G101 1 -> 2 on the same poll as SSNADDHP took 1702 to 40 health. Reliable (host-checked). |
|---|---|
| Use it like | if ssnwounded(1484) and never then ssnhp(1484, 100) endif |
| Takes | ssn an object's SSN (the number MED/Nile gives a placed object; players are 10000 + slot; inside PLOOP write player) |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code |
| Notes | A negative health value also counts as wounded. High confidence. |
true
True when the value is not 0.
| Tested in a match (13 Oct) | works (host + players) - G148 = 2 from step 1 and stayed 2 while G160 was -2/-1 (negative counts as true). Reliable. |
|---|---|
| Use it like | if true(V7) then flash endif |
| Takes | number a number or variable |
| Sent to players | No - server only |
| Multiplayer | Works in multiplayer: the host checks it. |
| How sure are we | Traced in the game's code, not tried in a match yet |
| Notes | Negative values count as true (Nile describes it as > 0). High confidence. |
waveready
True when the mission voice channel is free (no wave playing).
| Tested in a match (13 Oct) | works (host only - players do not see it) - G185 = 1 once armed (no wave playing). Host's own player only. R2 B6: after wave() it went false and stayed false for ~110 s, so it is not a reliable "clip finished" signal. |
|---|---|
| Use it like | if waveready() and chain(2) then wave("next.wav") endif |
| Takes | none |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | Nile says not to use it in co-op. High confidence. |
weaponfired
True when your own player tried to fire a weapon of armory category N during the last script pass.
| Tested in a match (13 Oct) | inconclusive - G140-G149 all stayed 0: the driver has no onhook_play_input support, so the host never fired (its consol line "host fires (driver input)" showed; ammo 30/270 unchanged). Negative only again; needs the driver input extension. |
|---|---|
| Use it like | if weaponfired(3) then text("No grenades here!") endif |
| Takes | number a weapon category 0-9 |
| Sent to players | No - server only |
| Multiplayer | Single player, or the host's own player on a listen server. Other players are not affected, and a dedicated server has no host player. |
| How sure are we | Traced in the game's code |
| Notes | The category is the weapon's armory type, 0-9; it counts even when blockfire stops the shot. High confidence. |