
Runs the code after the given delay (in seconds, can be partial seconds).
runLater(1000 * [NUMBER], function(task:TimedTask):Void {
[ACTIONS]
}, [ACTOR]);
Warning: Do not use this block in a
when updatingevent, unless constrained by anifblock or other conditional.

Runs the code every [N] seconds (can be partial seconds).
runPeriodically(1000 * [NUMBER], function(task:TimedTask):Void {
[ACTIONS]
}, [ACTOR]);
Warning: Do not use this block in a
when updatingevent, unless constrained by anifblock or other conditional.

do after n seconds and do every n seconds can be combined together. In this example, we implement a "blinking" effect by alternating the actor between hidden and not-hidden, without relying on a variable to store state.

Cancels the execution of a periodic (do every n seconds) task.
timeTask.repeats = false;
return;