Saltar al contenido principal

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

Call Script
Script
My Custom Script
  • Script: The script to run.

Si el actor esta en posición

Conditionally run part of the script if an actor is at a specified position.

Si el actor esta en posición
Actor
Actor 1
X
0
Y
0
Verdadero
Add Event
Sino
  • Actor: The actor you want to check.
  • X: The horizontal position.
  • Y: The vertical position.
  • Verdadero: The script to run if the condition is true.
  • Falso: 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.

If Actor Distance From Actor
Actor
Player
Comparison
<=
Distance
0
From
Actor 1
Verdadero
Add Event
Sino
  • 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.
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

Si el actor esta en dirección

Conditionally run part of the script if an actor is facing in a specified direction.

Si el actor esta en dirección
Actor
Actor 1
Dirección
Verdadero
Add Event
Sino
  • Actor: The actor you want to check.
  • Dirección: The actor direction.
  • Verdadero: The script to run if the condition is true.
  • Falso: 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.

If Actor Relative To Actor
Actor
Player
Comparison
Is Above
Other Actor
Actor 1
Verdadero
Add Event
Sino
  • 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.
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

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.

If Color Mode Is Available
Verdadero
Add Event
Sino
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

Si los datos de juego fueron guardados

Conditionally run part of the script if save data is present within the specified save slot.

Si los datos de juego fueron guardados
Save Slot
Slot 1
Slot 2
Slot 3
Ejecutar si el jugador a guardado la partida.
Verdadero
Add Event
Sino
  • Save Slot: The save slot to use.
  • Verdadero: The script to run if the condition is true.
  • Falso: 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.

If GBA Mode Is Available
Verdadero
Add Event
Sino
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

Si un botón es presionado

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

Si un botón es presionado
Cualquiera de
A
B
Start
Select
Verdadero
Add Event
Sino
  • Cualquiera de: The input buttons to check.
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

If Math Expression

Conditionally execute part of the script if the specified math expression evaluates to true.

References
/docs/scripting/math-expressions

If Math Expression
Expression
e.g. $health >= 0...
Verdadero
Add Event
Sino
  • Expression: The expression to evaluate.
  • Verdadero: The script to run if the condition is true.
  • Falso: 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.

If Super GB Mode Is Available
Verdadero
Add Event
Sino
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

Si la variable se compara con valor

Conditionally run part of the script based on the value of a variable compared with a value.

Si la variable se compara con valor
Variable
$Variable0
Comparison
==
Valor
0
Verdadero
Add Event
Sino
  • Variable: The variable to use.
  • Comparison: The comparison operator to use e.g. 'Less Than' or 'Greater Than'.
  • Valor: The value to compare with.
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

Si la variable se compara con variable

Conditionally run part of the script based on the value of a variable compared with another variable.

Si la variable se compara con variable
Variable
$Variable0
Comparison
==
Other Variable
$Variable0
Verdadero
Add Event
Sino
  • Variable: The variable to use.
  • Comparison: The comparison operator to use e.g. 'Less Than' or 'Greater Than'.
  • Other Variable: The variable to compare with.
  • Verdadero: The script to run if the condition is true.
  • Falso: 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.

If Variable Has Flag
Variable
$Variable0
Flag
Flag 1
Verdadero
Add Event
Sino
  • Variable: The variable to use.
  • Flag: The flag to check.
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

Si la variable es 'Falso'

Conditionally run part of the script if the specified variable is set to false.

Si la variable es 'Falso'
Variable
$Variable0
Verdadero
Add Event
Sino
  • Variable: The variable to use.
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

Si la variable es 'Verdadero'

Conditionally run part of the script if the specified variable is set to true.

Si la variable es 'Verdadero'
Variable
$Variable0
Verdadero
Add Event
Sino
  • Variable: The variable to use.
  • Verdadero: The script to run if the condition is true.
  • Falso: The script to run if the condition is false.

Repetir infinitamente

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.

Repetir infinitamente
Add Event

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.

Loop For
For
$Variable0
From
0
Comparison
<=
To
10
Operation
+=
Valor
1
Add Event
  • 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.
  • Valor: 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.

Loop While
Expression
e.g. $health >= 0...
Add Event
  • Expression: The expression to evaluate.

Script: Detener

Stops the current script from running.

Script: Detener
Deterner al script actual de ser ejecutado.

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.

Switch
Variable
$Variable0
Number of options
2
When: $$value0$$
Valor
1
Add Event
When: $$value1$$
Valor
2
Add Event
Sino
Add Event
  • Variable: The variable to use.
  • Number of options: The number of options required.
  • Valor: The value to compare the variable with for running this branch of the script.