return
Pops the call stack and jumps to the saved resume node after the current command batch.
{ "type": "return" }
[return]
Usually you need
No fields — empty object / bare [return].
All fields
| Field | Type | Default | Effect |
|---|---|---|---|
when | expression | — | Skip when falsy |
Rules
- Empty stack → warning, no-op (stay on the current node).
- Empty resume id (caller had no valid
next) → story ends after the batch. - If a subroutine node has no
nextand no choices, Continue / advance auto-returns when the stack is non-empty (same resume as an explicit[return]). - Prefer an explicit
[return]at the end of reusable cutaways.
See call. Batch timing: Command flow.