API ReferenceGE Extensionsflowgraphnodesstates
Get Transition Variables (Flowgraph Node)
- **Node Name:** `Get Transition Variables`
Overview
- Node Name:
Get Transition Variables - Category: (default)
- File:
extensions/flowgraph/nodes/states/transitionStack.lua
Retrieves data that was passed through a state transition. Acts as the receiving end of data sent by a Transition node.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Flow pin (fixed) |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Passes through input flow |
Custom output pins can be added to receive transition data (supports string, number, bool, any, table, vec3, quat, color).
Behavior
init()- Enables pin saving and custom output pins.onStateStarted(state)- Captures thetransitionStackfrom the state object when the state begins.work()- Copies values from the captured stack to matching output pins by name. Passes flow through._executionStopped()- Clears the stored stack.makePinTemplates()- Scans all transition and transitionStack nodes to build pin templates (shared logic with the Transition node).
Editor Display
drawMiddle()- Shows(Stack)with a tooltip of the stack contents when data is present, or(nil)when empty.
How It Works
- When a Transition node fires, it can pass data (e.g. score, player name) through the transition.
- The state manager stores this data in the transition stack.
- When the next state starts,
onStateStartedcaptures the stack. - Custom output pins with matching names receive the corresponding values.
-- In State A's sub-graph:
-- [Game Logic] → [Transition] (with custom pin "score" = 100)
-- In State B's sub-graph:
-- [TransitionStack] (with custom out pin "score") → [Use Score]
-- The "score" output will contain 100Key Dependencies
self.mgr.states- State manager provides transition stack dataui_flowgraph_editor- Tooltip display utility
Additional Methods
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