Skip to content

28 — Global Set...

Sets one of the scenario's fifty global variables.

Editor data
Numeric ID
28
Engine ID
TACTION_SET_GLOBAL
Editor name
Global Set...
Need token
NEED_GLOBAL
Parameters
  1. Global variableglobal-variable
Attachment
none
INI example
[Actions]
<TriggerID>=1,28,0,<Global variable>,0,0,0,0,

Valid values

  • A global variable number from 0 to 49. A number outside that range does nothing.
Caveats
  • Setting a global that is already set changes nothing, and restarts no countdown.
  • When the global changes, every trigger with a [Global is set](/mapping/events/tevent-global-set/) or [Global is clear](/mapping/events/tevent-global-clear/) event naming it restarts its elapsed-time or random-delay countdown, and a random delay is drawn again. Pairing either event with one of those events therefore measures the delay from the change.
  • Global is set and Global is clear test the variable's current state every frame. They do not depend on the moment this action runs.
  • A global's name is only a label. The rules file gives the names in its [VariableNames] section, one entry per global number, such as 0=BridgeDown. The same section in a map file names the scenario's local variables.
  • Globals carry into the next campaign mission, as [what survives the boundary](/systems/campaign-progression/#what-survives-the-boundary) describes.