Action: Randomtimer(alarm ID, delay, range)

Related Actions: timer, lettimer, iffixed, ifmapped, ifmoved, ifnotfixed, ifnotmapped, ifnotmoved, exitevent
Related Events: alarm
See also: FKiSS, Events, Actions

randomtimer(alarm ID, delay, range)

First defined in: FKiSS1
The timer action sets the timer for an alarm. If a timer for that alarm is already counting down, the new delay time will replace it, resetting the alarm's timer.
The timer will be set to a random value between delay and (delay + range).

alarm ID

In FKiSS1 to FKiSS2.1, alarm ID must be an alarm ID number.
In FKiSS3, alarm ID may be an alarm ID number or a variable representing an alarm ID number.
In FKiSS4, alarm ID may be an alarm ID (number or symbolic name) or a variable representing an alarm ID number.

delay

In FKiSS1 to FKiSS2.1, delay must be a number representing the delay time in milliseconds.
In FKiSS3, delay may be a number or a variable representing the delay time in milliseconds.

range

In FKiSS1 to FKiSS2.1, range must be a number representing the range of delay time in milliseconds.
In FKiSS3, range may be a number or a variable representing the range of the delay time in milliseconds.

Example:

;@ randomtimer(5, 1000, 500)       ; Set alarm 5 to go off in 1000 to 1500 milliseconds.
;@ randomtimer(A, D, R)            ; set alarm identified by variable A to go off in a value between D and (D + R) milliseconds.
;@ randomtimer(MyAlarm, 1000, 500) ; Set "MyAlarm" to go off in 1000 to 1500 milliseconds.