Checks whether the condition is true
or false
. If the condition is true
, the blocks wrapped inside will execute.
if([BOOLEAN]) {
[ACTIONS]
}
Use directly below an "If" block. If the condition in the preceding "If" block is false
, the blocks wrapped inside the "Otherwise" block will execute.
else {
[ACTIONS]
}
Use directly below an "If" block. If the condition in the preceding "If" block is false
, and the condition of this wrapper is true
, the blocks wrapped inside the "Otherwise If" block will execute. Equivalent to doing the following:
else if([BOOLEAN]) {
[ACTIONS]
}
Booleans (denoted by a hexagon shape) are conditions that resolve to true
or false
.
Returns true
if both of the provided conditions are true
. If the first condition is false
, the second condition will not be evaluated.
[BOOLEAN] && [BOOLEAN]
Returns true
if at least one of the provided conditions is true
. If the first condition is true
, the second condition will not be evaluated.
[BOOLEAN] || [BOOLEAN]
Returns true
if the condition resolves to false
. Testing if not [CONDITION]
is equivalent to if [CONDITION] = false
.
![BOOLEAN]
Literal values of true
and false
.
true
false
Returns true
if both values are equal.
[VALUE] == [VALUE]
Returns true
if the values are not equal.
[VALUE] != [VALUE]
Returns true
if...
Operator | Description |
---|---|
![]() |
First number is smaller than second number. |
![]() |
First number is smaller than or equal to than second number. |
![]() |
First number is larger than second number. |
![]() |
First number is larger than or equal to second number. |
[NUMBER] < [NUMBER]
[NUMBER] <= [NUMBER]
[NUMBER] > [NUMBER]
[NUMBER] >= [NUMBER]
Converts the given value (typically text) into a Boolean. May throw a compile-time or runtime error if conversion is not possible.
asBoolean([VALUE])
Skips the rest of the code in this event for the current step/frame.
return;