Docs · timers

timers

4 timers commands, generated from the engine's own registry — signatures, parameters and a worked example each. A does something command acts on the game; a needs x() one answers a confident wrong answer when its client hooks are missing.

clearTimer does something
clearTimer(name: string)

Forgets a marked moment, so the next ready() for it is true again.

ParameterTypeWhat it does
namerequired string the timer to forget
Example
clearTimer("banked")
mark does something
mark(name: string)

Remembers 'now' under a name, so since() and ready() can measure from it. Call it after doing the thing the cooldown guards.

ParameterTypeWhat it does
namerequired string the name of the moment to remember
Example
mark("banked")
ready returns bool
ready(name: string, everyMillis: int) -> bool

Whether a cooldown is up: true when it has been at least this long since the name was marked, and always true the first time before any mark.

ParameterTypeWhat it does
namerequired string the name that was marked
everyMillisrequired int how long the cooldown is, in milliseconds
Example
if ready("eat", 3000) { print("can eat") }
since returns int
since(name: string) -> int

How many milliseconds since a name was last marked, or a very large number when it has never been marked.

ParameterTypeWhat it does
namerequired string the name that was marked
Example
if since("banked") > 60000 { print("a minute has passed") }