DocsBuilt-in functions
Time
Wait, run code later, or run it again and again. A wait pauses only its own script.
$wait
$wait[seconds]
Waits some seconds of game time (or one frame) and gives how long it waited.
wait.naja
$print[Ready]
$wait[0.5]
$print[Go!] najova run wait.naja
Ready Go!
$afterBlock
$after[seconds]
Runs what follows once, after some seconds of game time.
after.naja
$after[0.3]
$print[This prints second]
$endafter
$print[This prints first] najova run after.naja
This prints first This prints second
$everyBlock
$every[seconds] or $every[seconds;link]
Runs what follows every few seconds. The link name can stop it: $call[link.Stop].
every.naja
$let[left;3]
$every[0.1;countdown]
$print[$get[left]]
$set[left;$get[left] - 1]
$if[$get[left] == 0]
$call[countdown.Stop]
$endif
$endevery najova run every.naja
3 2 1
$time
$time
Seconds of game time since the game started.
time.naja
$wait[0.2]
$print[About 0.2 seconds: $checkCondition[$time >= 0.2]] najova run time.naja
About 0.2 seconds: true
$now
$now
Real-world seconds since 1970 (for dates; $time is game time).
now.naja
$print[Seconds since 1970 is a big number: $checkCondition[$now > 1700000000]] najova run now.naja
Seconds since 1970 is a big number: true
$date
$date, $date[format] or $date[format;seconds]
The date and time as text, like 2026-11-05 14:03:22; YYYY MM DD hh mm ss in the format are its parts.
date.naja
$print[$date[DD/MM/YYYY;1767268800]]
$print[$date[YYYY-MM-DD;1767268800]] najova run date.naja
01/01/2026 2026-01-01