51 — Random delay...
Satisfied when the trigger's countdown, set to a random delay drawn around the given number of seconds, reaches zero.
Editor data
- Numeric ID
51- Engine ID
TEVENT_RANDOM_TIME- Editor name
- Random delay...
- Need token
NEED_NUMBER- Parameters
- Number
integer
- Number
- Attachment
- general
INI example
[Events]
<TriggerID>=1,51,0,<Number>Valid values
- A delay in seconds of game time. Each second is 15 game frames. The countdown is set to half this value, rounded down, plus a whole number of seconds drawn from
0to the value. 0sets the countdown to zero, so the event is satisfied on the first frame.
Caveats
- The delay runs from half the value to one and a half times it. Rounding drops the half second of an odd value, so
9gives a delay of 4 to 13 seconds. - A new delay is drawn each time the countdown restarts, so a persistent tag fires the trigger at irregular intervals.
- The countdown belongs to the trigger. It starts when the scenario creates the trigger, and restarts whenever the trigger is enabled, even if it is already enabled.
- The countdown also restarts when a global or local variable that one of the trigger's events tests changes value, and each time a persistent tag fires the trigger.
- A trigger has only one countdown. If it holds more than one Elapsed Time or Random Delay event, only the delay of the one written first in its event row applies.
- Every machine in a multiplayer game draws the same delay.
- The event puts its tag on the general list, which is offered at the start of every frame. The event is satisfied from the first frame the countdown reads zero.
- A semi-persistent tag fires only while exactly one object or map cell holds it, and this event attaches the tag to neither. Use a volatile or a persistent tag.