timer
Counts wait_time seconds down and emits timeout from the node, which bindings hear as emitted:timeout. running or autostart starts it; one_shot stops…
On this page
interaction · 5 properties · Other
Counts wait_time seconds down and emits timeout from the node, which bindings hear as emitted:timeout. running or autostart starts it; one_shot stops after one round.
In a scene, timer is the node key that applies it. A script reaches each property below as a field on node.timer: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.timer.get() and node.timer.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
autostart |
bool | false |
Start counting as soon as the node is in the scene |
one_shot |
bool | false |
Stop after one timeout; off, count the next one at once |
running |
bool | false |
Whether it is counting; set true to start it from wait_time, false to stop it |
time_left |
float | 0 |
Seconds until the next timeout Read-only: engine output the inspector shows but never writes. At least 0. |
wait_time |
float | 1 |
Seconds from starting to timeout At least 0.001. |