Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

timer

Starts a named countdown. When it reaches zero, the story navigates to on_end (a node id, or NEXT / END / START). Use pause/resume/stop to control it. There is no built-in countdown display — signal urgency with dialogue, SFX, or your own UI later.

{ "type": "timer", "id": "bomb", "seconds": 30, "on_end": "explode" }
[timer id=bomb seconds=30 on_end=explode]
… later …
[timer id=bomb stop]

Usually you need

FieldTypeEffect
idstringTimer name (restarting the same id replaces it)
secondsnumber > 0Duration (start only)
on_endstringWhere to go when time runs out
actionpause / resume / stopControl an existing timer (instead of start)

Mode A

[timer id=bomb seconds=30 on_end=explode]
[timer id=bomb pause]
[timer id=bomb resume]
[timer id=bomb stop]

Spaced keys also work: [timer id bomb seconds 30 on_end explode].

Rules

  • Start shape: id + seconds + on_end. Control shape: id + action.
  • on_end resolves like choice targets: node id, NEXT, END, or START.
  • Timers freeze while a blocking screen is open (pause menu, etc.) and while the story is not in play. Author pause / resume is separate.
  • Remaining time is saved with the play session. New Game / return to title clears all timers.
  • For a menu that times out, use choices.timer on the choice object — not a separate wait.
  • To stop a timer only when a flag is set, use command meta when on the stop command.

All fields

FieldTypeDefaultEffect
idstring—Required
secondsnumber—Start only; must be > 0
on_endstring—Start only
actionstring—pause, resume, or stop
whenexpression—Skip when falsy

See also