The "timer_set_time" Function
#
SyntaxArgument | Type | Description |
---|---|---|
id | string | The unique timer ID to modify, as a string (or keyword all for all local timers) |
duration | real | Sets the duration of time to countdown, in seconds |
[instance] | instance | Optional: Sets the object instance containing the timer to modify (use none for self ) |
#
DescriptionOverrides the current time in the specified timer, restarting the countdown process. If the timer does not exist, it will be created, but not countdown.
Note that if this script is run in an event that is executed every frame (e.g. Step), the timer will be unable to countdown! If this is required, use an if
statement to only set the timer under certain conditions.
tip
See the included interactive demo for a visual example of this function!