User Tools

Site Tools


conditional_expression

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
conditional_expression [2020/02/14 12:35] justinconditional_expression [2020/02/14 12:40] justin
Line 16: Line 16:
 ====Examples:==== ====Examples:====
 <code bauxite> <code bauxite>
-self.property["visited"== true+self.property["visited"]
 </code> </code>
 +Evalutes to true if the self [[entity|entity's]] property "visited" contains the [[Boolean]] value of true.
 <code bauxite> <code bauxite>
 global.property["gems_collected"] >= 5 global.property["gems_collected"] >= 5
Line 23: Line 24:
 Evaluates to true if the global property "gems_collected" contains a numerical value greater than or equal to 5. Evaluates to true if the global property "gems_collected" contains a numerical value greater than or equal to 5.
 <code bauxite> <code bauxite>
-player.inventory contains "ITEM_0001"+player.inventory contains "ITEM_0001" and player.inventory contains[3] "ITEM_0005"
 </code> </code>
-Evaluates to true if the player has at least one of "ITEM_0001" in their inventory.+Evaluates to true if the player has at least one of "ITEM_0001" and at least 3 of "ITEM_0005" in their inventory.
 <code bauxite> <code bauxite>
 initiator.tags contains "human" initiator.tags contains "human"
conditional_expression.txt · Last modified: 2022/12/16 18:25 by justin