-
Notifications
You must be signed in to change notification settings - Fork 0
Jump Labels
Grisgram edited this page Jul 14, 2025
·
7 revisions
To address some of the single-line limitations in Scriptor, the goto command provides a valid way to navigate and control code flow, similar to command shell scripts.
The goto command requires a target, which is defined using jump labels.
A jump label is any word (without spaces) starting with a colon :, as you know it from command shells.
Here is an example:
if self.enemy.hp > 0 goto skip_over
self.enemy.set_state("die")
:skip_over <-- this is the jump label
// continue with the scriptIn this example:
- If
self.enemy.hp > 0, the script jumps to theskip_overlabel, bypassing the lineself.enemy.set_state("die"). - The script resumes execution at the jump label.
Back to Repo ● Wiki Home
Copyright © coldrock.games
- Home
- Scriptor Contents
- Scriptor Configuration
- Notepad⁺⁺ Integration
- Create a Script
- $ Variables
- Call a GML Function
- Scriptor global functions
- #-Commands
- The Scriptor Broker
- Broker Events
- Self-Registering Scripts
- Registering Broker Events
- Scriptor Broker File Format
- Extending Scriptor
- var
- new
- goto
- gosub and return
- return (without gosub)
- call
- reset
- Loops
- Conditionals