Control Flow
Call Script
Call one of your custom scripts. Once you have chosen a script you will be able to hook up any parameters required.
References
/docs/scripting/custom-scripts
- Script: The script to run.
If
Conditionally run part of the script if the specified value evaluates to true.
- Condition: The condition to evaluate.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
Loop
Run part of the script in a loop forever. Remember to break out of the loop otherwise the player will become stuck at this point. You can use a Stop Script or Change Scene event to stop the loop.
Loop For
Run part of the script in a loop while a counter variable is within a specified range. On each loop the counter variable is modified before the next check.
- For: The variable to use.
- From: The initial value of the counter variable.
- Comparison: The comparison operator to use e.g. 'Less Than' or 'Greater Than'.
- To: The end value of the counter variable.
- Operation: The operation to use for combining a value with the counter variable after each loop.
- Value: The value to combine with the counter variable after each loop.
Loop While
Run part of the script in a loop while an expression is true.
- Condition: The condition to evaluate.
Stop Script
Stops the current script from running.
Switch
Conditionally run from multiple options depending on the value of the specified variable. First choose how many options you want to compare the variable against, then set the values to compare and what scripts to execute when the value is matched.
- Variable: The variable to use.
- Number of options: The number of options required.
- Value: The value to compare the variable with for running this branch of the script.
Actor
If Actor At Position
Conditionally run part of the script if an actor is at a specified position.
- Actor: The actor you want to check.
- X: The horizontal position.
- Y: The vertical position.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
If Actor Distance From Actor
Conditionally run part of the script if an actor is within a certain distance of another actor.
- Actor: The actor you want to check.
- Comparison: The comparison operator to use e.g. 'Less Than' or 'Greater Than'.
- Distance: The distance value.
- From: The actor to compare distance with.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
If Actor Facing Direction
Conditionally run part of the script if an actor is facing in a specified direction.
- Actor: The actor you want to check.
- Direction: The actor direction.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
If Actor Relative To Actor
Conditionally run part of the script based on the position of one actor relative to another.
- Actor: The actor you want to check.
- Comparison: The relative position comparison to use e.g. 'Is Above' or 'Is Below'.
- Other Actor: The actor to compare position with.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
Device
If Color Mode Is Available
Conditionally run part of the script if the game is being played on a device or emulator that supports color games.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
If GBA Mode Is Available
Conditionally run part of the script if the game is being played on a device or emulator that supports GBA games.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
If Super GB Mode Is Available
Conditionally run part of the script if the game is being played on a device or emulator that supports Super GB games.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
Joypad Input
If Button Held
Conditionally run part of the script if the specified joypad button is currently pressed. Will not wait for user input and will only execute once, if you wish to run a script every time a button is pressed use Attach Script To Button instead.
References
/docs/scripting/script-glossary/input#attach-script-to-button
- Any of: The input buttons to check.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
Math
If Math Expression
Conditionally execute part of the script if the specified math expression evaluates to true.
- Condition: The condition to evaluate.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
Loop While Math Expression
Run part of the script in a loop while an expression is true.
- Condition: The condition to evaluate.
Save Data
If Game Data Saved
Conditionally run part of the script if save data is present within the specified save slot.
- Save Slot: The save slot to use.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
Scene
If Current Scene Is
- Scene
- True
- False
Variables
If Variable Compare With Value
Conditionally run part of the script based on the value of a variable compared with a value.
- Condition: The condition to evaluate.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
If Variable Compare With Variable
Conditionally run part of the script based on the value of a variable compared with another variable.
- Condition: The condition to evaluate.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
If Variable Has Flag
Conditionally run part of the script if the specified variable has the chosen flag set as true.
- Variable: The variable to use.
- Flag: The flag to check.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
If Variable Is 'False'
Conditionally run part of the script if the specified variable is set to false.
- Condition: The condition to evaluate.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.
If Variable Is 'True'
Conditionally run part of the script if the specified variable is set to true.
- Condition: The condition to evaluate.
- True: The script to run if the condition is true.
- False: The script to run if the condition is false.