API ReferenceGE Extensionsflowgraphnodeslogic
Chainflow Branch (Flowgraph Node)
- **Node Name:** `Chainflow Branch`
Overview
- Node Name:
Chainflow Branch - Category:
logic - File:
extensions/flowgraph/nodes/logic/chainFlowBranch.lua
Routes chain-flow to either True or False output based on a boolean condition. Similar to the standard Branch node but operates exclusively with chain flow pins.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Chain flow inflow (chainFlow = true) |
condition | bool | The condition to check |
Output Pins
| Pin | Type | Description |
|---|---|---|
True | flow | Chain flow when condition is true (chainFlow = true) |
False | flow | Chain flow when condition is false (chainFlow = true) |
Behavior
work()- When chain flow is active, routes toTrueorFalsebased on the condition. When no flow, both outputs are false.
How It Works
Chain flow is a special flow type in BeamNG flowgraphs that ensures sequential execution order. This node provides conditional branching within a chain flow context, guaranteeing that downstream nodes execute in the correct order.
Unlike the regular Branch node, this one has no passthrough flow output - it only outputs chain flow on True or False.
Example Usage
-- Used in chain-flow contexts where execution order matters
-- Connect chain flow input and a boolean condition
-- Only one of True/False will receive chain flow
-- Equivalent logic:
if condition then
-- True chain continues
else
-- False chain continues
endSee Also
- And (Flowgraph Node) - Related reference
- Boolean Expression (Flowgraph Node) - Related reference
- Branch (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide