Use the Compare node to create conditional events in your games. The node compares two numbers and triggers different things based on the outcome.
If you are familiar with programming, you can think of Compare as a simple if statement.
Execute | Executes the node | |
↳ On Start | Executes the node at the start of the game | |
Enabled | Enable or disable the node. Disabled nodes cannot be executed | |
Value A / B | The values that will be compared by the node. Can be set manually or as inputs from other nodes | |
Operator | Less than | Compares if A is less than B |
Less or equal | Compares if A is less than or equal to B | |
Equal | Compares if A and B are equal | |
Greater or equal | Compares if A is greater than or equal to B | |
Greater than | Compares if A is greater than B | |
Output if true | Sends a signal if the result of the comparison is true Note: The output also passes the value which was used to execute the node. For example, if you use an executing link to set the Value A to 7 and the comparison result is true, the output value is 7. |
|
Output if false | Sends a signal if the result of the comparison is false Note: The output also passes the value which was used to execute the node. |
|
Output value | Sends the value 0 if the comparison result is false and 1 if the result is true |
Here's a link to a demo that shows how to use the Compare node: