call
Jumps to a subroutine node after the current command batch and pushes a return frame.
Resume is the caller’s resolved next (via next_if / next) — not the rest of the same node.
{ "type": "call", "to": "phone_ring" }
:: hallway
You're in the hallway.
[call phone_ring]
-> hallway_after
:: phone_ring
Your phone rings.
[return]
:: hallway_after
You're still in the hallway.
Usually you need
| Field | Type | Default | Effect |
|---|---|---|---|
to | string | — | Subroutine entry node id |
All fields
| Field | Type | Default | Effect |
|---|---|---|---|
to | string | — | Target |
when | expression | — | Skip when falsy |
Rules
- Prefer calling from nodes without pending choices; resume uses linear
nextonly. - Mid-node resume (text after
[call]in the same node) is not supported — put continuation on a following node. - Nesting depth is capped (64). A
jump/jump_ifwhile a call is active clears the stack (returns abandoned). - First control command in a batch wins (
call/return/jump/ story end).
Batch timing: Command flow. Pair with return.