rex_timer
Introduction
Fire the trigger when time-out.
Fire the trigger when time-out.
Start a timer
Call "Action:Start" to start a timer. It will trigger "Condition:On time-out" when time-out.
Parameter "Repeat" in "Action:Start" is the repeat count of this timer. Set to 0 is infinity.
Call "Action:Start" to start a timer. It will trigger "Condition:On time-out" when time-out.
Parameter "Repeat" in "Action:Start" is the repeat count of this timer. Set to 0 is infinity.
Pause, resume, and stop
"Action:Pause", "Action:Resume", "Action:Stop" could pause, resume or stop a timer.
Or uses "Action:Pause all", "Action:Resume all", "Action:Stop all" to pause, resume or stop all timers.
"Action:Pause", "Action:Resume", "Action:Stop" could pause, resume or stop a timer.
Or uses "Action:Pause all", "Action:Resume all", "Action:Stop all" to pause, resume or stop all timers.
Sync timescale
All timers could be affected by timescale of this instance, if "Sync timescale" sets to "Yes" in properties table. It is another way to pause or resume all durations, or slow down/go fast all durations. In other words, set "Sync timescale" to "No" could pause the sprite without pausing all durations.
These timers will also be affected by timeline object.
All timers could be affected by timescale of this instance, if "Sync timescale" sets to "Yes" in properties table. It is another way to pause or resume all durations, or slow down/go fast all durations. In other words, set "Sync timescale" to "No" could pause the sprite without pausing all durations.
These timers will also be affected by timeline object.
Compared with official timer behavior
There are some different between this timer behavior and official timer behavior.
There are some different between this timer behavior and official timer behavior.
- This timer behavior has "Repeat" parameter for each timer. Official timer only has once or infinity mode.
- This timer behavior could still be running when setting time-scale of this instance to 0 (Set "Sync timescale" to "No"). Official timer will be paused when time-scale to 0 .
- This timer might trigger "Condition:On time-out" many times in a tick. Official timer only trigger "Condition:On timer" once mostly. For example, set time-out to 0.01 and run infinity. This timer will trigger "Condition:On time-out" 100 times in 1 second. Official timer will trigger "Condition:On timer" 60 times in 1 second. (Sample capx)
- "Condition:On time-out" of this timer will be triggered for each instance. "Condition:On timer" of official timer will be triggered for those instances which time-out in this tick, so that it need add "Condition: for each" to pick each instance.