Greater Than (Integer)
The Greater Than (Integer) node compares two integer values and outputs a boolean indicating whether the first value is greater than the second.Inputs
a(integer, default: 0): The first value to compare.b(integer, default: 0): The second value to compare.
Outputs
result(boolean): True ifais greater thanb, false otherwise.
Configuration
This node has no configuration options.Usage
To use the Greater Than (Integer) node:- Connect the integer values you want to compare to the
aandbinput ports. - The
resultoutput port will emit a boolean value indicating whetherais greater thanb.
Example
Suppose you have a spell that needs to check if a user’s age is greater than 18. You can use the Greater Than (Integer) node to make this comparison.- Connect the user’s age (an integer value) to the
ainput port. - Connect the integer value 18 to the
binput port. - The
resultoutput port will emittrueif the user’s age is greater than 18, andfalseotherwise.
result value to conditionally execute different parts of your spell based on the user’s age.
Best Practices
- Ensure that the values connected to the
aandbinputs are of type integer. Connecting other data types may lead to unexpected behavior. - Remember that this node only checks if
ais strictly greater thanb. If you need to check for greater than or equal to, you should use a combination of the Greater Than and Equal nodes.
Common Issues
- If either of the input values is missing or not an integer, the node will output
false. Make sure to properly handle missing or invalid data earlier in your spell. - Be careful not to confuse the order of the inputs. The node checks if
ais greater thanb, not the other way around.
