if statement - coldrockgames/doc-scriptor GitHub Wiki
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_shield