API ReferenceGE Extensionsflowgraphnodeslogic
Frame Delay (Flowgraph Node)
- **Node Name:** `Frame Delay`
Overview
- Node Name:
Frame Delay - Category:
logic - File:
extensions/flowgraph/nodes/logic/frameDelay.lua
Delays flow output by a specified number of frames after being triggered. Requires continuous flow input to count frames.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Continuous inflow (must be sustained) |
reset | flow | Resets the counter (impulse) |
frames | number | Number of frames to delay (default: 1, hardcoded, hidden) |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Outflow after the frame count is reached |
Behavior
init(mgr, ...)- Resets counter to 0, not running.work(args)- On reset impulse, clears counter. When flow starts and not already running, begins counting. Increments counter each frame. Output becomes true when counter exceeds the frame threshold.updateCounter()- Increments the frame counter by 1 each call; stops running when count exceeds target._executionStarted()- Resets counter and running state.drawMiddle()- Shows a progress bar and a reset button.
How It Works
When flow first arrives, the node starts counting frames. Each work() call increments the counter by 1. Once the counter exceeds the configured frames value, the output flow becomes active. The node requires continuous flow input - if flow stops before the count is reached, the counter state is preserved but won't advance.
The reset pin or the UI reset button clears the counter back to 0.
Example Usage
-- Delay flow by 5 frames:
-- frames = 5
-- Connect continuous flow input
-- Output fires starting on frame 6
-- Use reset to restart the delay:
-- Connect a reset trigger to start the count overAdditional Methods
C:_onDeserialized(res)
Called after the node is deserialized (loaded from file). Restores runtime state from saved data.
Parameters:
res
C:_onSerialize(res)
Called when the node is serialized (saved to file). Returns data to persist.
Parameters:
res
See Also
- And (Flowgraph Node) - Related reference
- Boolean Expression (Flowgraph Node) - Related reference
- Branch (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide