The "wait" Function
#
SyntaxArgument | Type | Description |
---|---|---|
duration | real | Sets the duration of time to wait, in seconds |
[offset] | real | Optional: Sets the amount of time to offset the timer |
#
DescriptionReturns false
for a specified interval, as a value of seconds, after which true
will be returned for one frame. Repeats endlessly.
Note that this script's starting time is based on instance creation time, and will always return true
at the same time for every instance of any object created in the same Step. Sometimes this synchronization is not desirable, in which case an optional offset time can also be supplied. Unlike the main time interval, the offset value can be either positive or negative. For example, to base starting time on global session time, use -game_get_time()
(must be a variable declared in an event that is not run every Step).