API ReferenceGE Extensionsflowgraphnodesutil
Push Action Map
- **Node Name:** `Push Action Map`
Overview
- Node Name:
Push Action Map - Category:
once_instant - File:
extensions/flowgraph/nodes/util/pushActionMap.lua
Pushes an action map onto the input stack, enabling its input bindings. Automatically pops the action map when execution stops.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
name | string | Name of the action map to push |
Internals
Key Methods
| Method | Description |
|---|---|
init(mgr) | Calls _executionStopped() for initial cleanup |
_executionStopped() | Pops the action map if one was pushed, clears mapName |
workOnce() | Stores the pin value in mapName and calls pushActionMap() |
drawMiddle(builder, style) | Displays which action map is currently pushed |
Auto-Cleanup
When the flowgraph execution stops, _executionStopped() automatically pops the action map. This ensures no stale action maps remain on the stack.
Known Issues
The node's todo field notes: "Weird behaviour if multiple projects use the same action map."
How It Works
workOnce()reads the action map name from the input pin and callspushActionMap(name).- Stores the name in
self.mapNamefor later cleanup. - The editor displays the pushed map name in the node's middle area.
- On execution stop, automatically pops the map to prevent input conflicts.
Usage Example
-- Enable custom race controls during a race:
-- [Race Start] → flow → [Push Action Map] name="RaceControls"
-- ...race gameplay... (map auto-pops when flowgraph stops)
-- Or explicitly pop:
-- [Race End] → flow → [Pop Action Map] name="RaceControls"Key Dependencies
pushActionMap()- engine function to push an action map onto the stackpopActionMap()- engine function to remove an action map from the stack
See Also
- Route Distance (Flowgraph Node) - Related reference
- Closest Road (Flowgraph Node) - Related reference
- Custom Lua (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide