51 — Random delay...
Satisfied when the trigger's countdown reaches zero, the countdown being a random time between half and one and a half times the given number of seconds.
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 number of seconds. Half of it, rounded down, is added to a whole number drawn from zero to the value itself, and the sum is the delay in seconds.
Caveats
- The draw is made afresh every time the countdown restarts, so a persistent trigger waits a different time on each pass rather than repeating at a fixed interval.
- The halving discards a remainder, so an odd number gives a range one second short at the bottom. A value of 9 draws between 4 and 13 seconds rather than between 4.5 and 13.5.
- The countdown belongs to the trigger rather than to the event. It restarts when the trigger is created, when it is enabled, when a global or local variable one of the trigger's own events names changes value, and on any offer that satisfies every event of a persistent trigger.
- This event and the plain elapsed time event share the trigger's single countdown, so putting both on one trigger leaves only one delay in effect.
- The draw comes from the game's synchronized random number sequence, the one every machine in a multiplayer game advances in step.
- The event has nothing to ride on. Its tag joins the general list, which adds nothing to the attachment total a semi-persistent tag waits on, so a trigger built on events of this kind needs a volatile or a persistent tag.