Boolean
∨ (Boolean OR)
The Boolean OR node performs a logical OR operation on two boolean inputs and outputs the result. It returns true
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 tofalse
if not connected.b
(boolean): The second boolean value. Defaults tofalse
if 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
a
andb
input ports. These can come from other nodes or be set manually. - The
result
output port will emittrue
if at least one ofa
orb
istrue
, andfalse
if both arefalse
. - Connect the
result
output 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:
In this case, [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
a
andb
inputs 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
false
which 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
true
even when you expectfalse
, double check that you haven’t accidentally connected atrue
value to one of the inputs. - Remember that the OR operation returns
true
if either or both inputs aretrue
. If you needtrue
only when both aretrue
, use the Boolean AND node instead.
The Boolean OR node is a simple but versatile logic gate that is essential for creating conditional flows in your Magick spells. Use it anytime you need to trigger actions or route data based on multiple conditions.