API ReferenceGE Extensionsflowgraphnodesstates
Transition (Flowgraph Node)
- **Node Name:** `Transition`
Overview
- Node Name:
Transition - Category: (default)
- File:
extensions/flowgraph/nodes/states/transition.lua
Ends the current state and switches to a new one by triggering a named transition on the parent state node.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Flow pin (fixed) |
Custom input pins can be added to pass data through the transition (supports string, number, bool, any, table, vec3, quat, color).
Output Pins
None by default.
Behavior
init()- Enables pin saving and custom input pins. Sets defaulttransitionNameto'success'.work()- When flow is active, collects all non-flow input pin values into atDatatable and callsself.mgr.states:transition(stateId, transitionName, tData, self).makePinTemplates()- Scans all transition and transitionStack nodes in the project to build a list of pin templates for the editor.drawMiddle()- Displays the current transition name.
Properties
- Transition Name - Dropdown populated from the parent state node's output pin names. Selects which exit to trigger.
Serialization
_onSerialize(res)- SavestransitionName._onDeserialized(data)- RestorestransitionName(defaults to'success').
Context Menu
- "Go to target..." - Submenu that resolves inter-hop links to show which state node the transition leads to. Clicking navigates the editor to that state's graph.
How It Works
- Place a Transition node inside a state's sub-graph.
- Set the transition name to match one of the parent state node's output pins (e.g.
success,fail). - When flow reaches the Transition node, it tells the state manager to exit the current state via the named transition.
- Any custom input pin values are passed as transition data (accessible via TransitionStack nodes).
-- Inside a state sub-graph:
-- Connect game logic → Transition node
-- Set transitionName = "success" to exit via the success pin
-- Data can be passed through transitions:
-- Add custom pins (e.g. "score" : number) to carry values to the next stateKey Dependencies
self.mgr.states- State manager that handles state transitionsui_flowgraph_editor- Node colors and icons
Additional Methods
C:customContextMenu()
Node method.
C:drawCustomProperties()
Custom ImGui drawing for the node's properties panel in the editor.
C:hideProperties()
Returns a set of property names to hide in the editor.
See Also
- State Entry (Flowgraph State Node) - Related reference
- State Exit (Flowgraph State Node) - Related reference
- State Node (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide