GML Overview: Control Statements

Control statements built into the GML language let you control which lines of code the program executes. The following types of control statements are available in GML:

Conditionals:
These statements allow you to add conditions under which different lines of code execute.
 * If
 * Switch

Loops:
These statements allow you to repeat lines of code (for a set number of times or until a condition is reached)
 * Repeat
 * While
 * Do
 * For
 * With

Jumps:
These statements you to end the execution of parts of a script.
 * Break
 * Continue
 * Exit

Previous: Arrays

Next: Functions

Back To GML For Non-Programmers