A conditional expression is an expression that evaluates to either true or false. An operator at the middle of the expression (for example “==” to check equality) is used to compare two different values on each side of the operator (i.e. the left operand and right operand). The expression can also be a standalone variable or property that was previously assigned a Boolean value. You can join multiple conditions together using the “and” keyword (all conditions must evaluate to true) or the “or” keyword (at least one of the conditions must evaluate to true). Refer to the table below for a list of all operators currently supported.
|Operator||Expression evaluates to true when:|
|==||Left operand is equal to the right operand.|
|!=||Left operand is not equal to the right operand.|
|<||Left operand is less than the right operand.|
|< =||Left operand is less than or equal to the right operand.|
|>||Left operand is greater than the right operand.|
|>=||Left operand is greater than or equal to the right operand.|
|contains||Left operand contains one or more of the right operand.|
|!contains||Left operand does not contain one or more of the right operand.|
|contains[x]||Left operand contains at least x of the right operand, where x is a number.|
|!contains[x]||Left operand does not contain at least x of the right operand, where x is a number.|
global.property["chapter"] == 2
Evaluates to true if the global property “chapter” contains a numerical value equal to 2.
global.property["gems_collected"] < 5
Evaluates to true if the global property “gems_collected” contains a numerical value less than 5.
player.inventory contains "ITEM_0005" and player.stat["level"] >= 10
Evaluates to true if the player has at least 3 of “ITEM_0005” in their inventory and their level is at least 10.
initiator.tags contains "human"
Evaluates to true if the initiator entity's list of model tags includes the tag “human”.