-
Notifications
You must be signed in to change notification settings - Fork 0
if statement
Grisgram edited this page Dec 29, 2024
·
5 revisions
if <condition>[== true] then <action>
The if statement is used to make decisions in your code by evaluating a condition and performing an action if the condition is true.
// Check for some value and leave, if you are done
if self.enemy.count == 0 then exit
// check a bool. "short" syntax (omit "==true" or "==false" is allowed!)
if self.enemy.has_shield then goto shielded
// or
if !self.enemy.has_shield then goto no_shieldBack 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