Jump
Jump to a different label in your script
Description
'jump <label_id>'The jump action moves script execution to a different label. This is essential for creating branching narratives, chapters, and non-linear story structures.
Action ID: Jump
Reversible: Yes
Requires User Interaction: No
Parameters
label_id
string
No
The name of the label to jump to.
Behavior
When a jump action is executed:
Validates that the target label exists
Stops any ambient audio
Records the jump in history (source and destination)
Changes the current label and resets step to 0
Clears the dialog (unless in NVL mode)
Executes the first statement of the new label
Basic Usage
Branching with Choices
The jump action is commonly used with choices to create branching paths:
Organizing Large Scripts
Use labels to organize your script into logical sections:
HTML Data Attribute
You can trigger jumps from HTML elements using the data-jump attribute:
When clicked, this will execute jump SpecialScene.
Error Handling
If the target label doesn't exist, the engine will display an error showing:
The target label that wasn't found
All available labels in your script
The current location in your script
Rollback Behavior
The jump action records history to support the back button:
Pressing back after a jump returns to the source label and step
The jump history tracks both source and destination
Label history is also maintained for proper rollback
[!NOTE] While jump is technically reversible, complex jump sequences may have unexpected rollback behavior. Test your back button functionality when using multiple jumps.
Examples
Conditional Jumps with Functions
Loop Back Pattern
Related Actions
Last updated
Was this helpful?