Condition
This node evaluates a boolean condition and routes flow accordingly.
The Condition node is similar to the If node but with slightly different behavior regarding evaluation timing.
The Condition node checks a boolean input. It can evaluate immediately when the input changes (reactive) or wait for a signal (imperative). It provides separate signal outputs for True and False states.
General
| Data | Description |
|---|
| Condition | The boolean value to evaluate. |
Actions
| Signal | Description |
|---|
| Evaluate | Manually triggers the evaluation. If this input is connected, the node waits for this signal. If disconnected, the node evaluates immediately when Condition changes. |
Outputs
Events
| Signal | Description |
|---|
| On True | Triggered if the condition is true. |
| On False | Triggered if the condition is false. |
Booleans
| Data | Description |
|---|
| Is True | Boolean value of the condition. |
| Is False | Boolean value of the inverse condition (!condition). |
Usage
Reactive vs. Manual
- Reactive (Default): Leave Evaluate disconnected. Whenever the Condition input changes (e.g., a variable updates), the node immediately fires On True or On False.
- Manual: Connect a signal to Evaluate. The node ignores changes to Condition until Evaluate is triggered. This behaves exactly like the If node.
Example Use Cases
- Game Over Check (Reactive): Connect
Health <= 0 to Condition. As soon as health drops, On True fires "Game Over".
- Form Submit (Manual): Connect
Is Valid to Condition and "Submit Button" to Evaluate. Only checks validity when button is clicked.
Detailed Behavior
- Dual Mode: The behavior changes based on whether the Evaluate port has a connection. This makes it more versatile than the standard If node.
- Outputs: Provides both signal and boolean data outputs for convenience.
Troubleshooting
- Unexpected Firing: If Evaluate is empty, the node fires on every data change. If you only want it to fire once or on command, connect the Evaluate input.