∨ (Boolean OR)
The Boolean OR node performs a logical OR operation on two boolean inputs and outputs the result. It returnstrue if at least one of the inputs is true, and false only if both inputs are false.
Inputs
a(boolean): The first boolean value. Defaults tofalseif not connected.b(boolean): The second boolean value. Defaults tofalseif not connected.
Outputs
result(boolean): The result of the logical OR operation on the two input values.
Configuration
This node has no configuration options.Usage
- Add the Boolean OR node to your spell.
- Connect boolean values to the
aandbinput ports. These can come from other nodes or be set manually. - The
resultoutput port will emittrueif at least one ofaorbistrue, andfalseif both arefalse. - Connect the
resultoutput to other nodes as needed in your spell.
Example
Suppose you have a spell that needs to trigger an action if either a button is pressed OR a certain condition is met. You can use the Boolean OR node to combine these two conditions:[Trigger Action] will receive true and fire whenever either [Button Pressed] or [Condition Met] (or both) are true.
Best Practices
- Make sure the values you connect to the
aandbinputs are actually booleans. Connecting other data types may lead to unexpected behavior. - If you only need one input condition, you can leave the other input disconnected. It will default to
falsewhich will not affect the result. - For more complex logical conditions, you can chain multiple Boolean OR nodes together. The output of one can feed into the input of the next.
Common Issues
- If the node is always outputting
trueeven when you expectfalse, double check that you haven’t accidentally connected atruevalue to one of the inputs. - Remember that the OR operation returns
trueif either or both inputs aretrue. If you needtrueonly when both aretrue, use the Boolean AND node instead.
