RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage
And (Flowgraph Node)Boolean Expression (Flowgraph Node)Branch (Flowgraph Node)Bundle (Flowgraph Node)Chainflow Branch (Flowgraph Node)Compare (Flowgraph Node)Edge Detector (Flowgraph Node)Flow Switch (Flowgraph Node)Frame Delay (Flowgraph Node)Once (Flowgraph Node)Flow Interval / Rate Limit (Flowgraph Node)Select (Flowgraph Node)Sequencer (Flowgraph Node)Switch Case (Flowgraph Node)Timed Trigger (Flowgraph Node)Wait (Flowgraph Node)XOR (Flowgraph Node)

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

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

PinTypeDescription
flowflowContinuous inflow (must be sustained)
resetflowResets the counter (impulse)
framesnumberNumber of frames to delay (default: 1, hardcoded, hidden)

Output Pins

PinTypeDescription
flowflowOutflow 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 over

Additional 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

Flow Switch (Flowgraph Node)

- **Node Name:** `Flow Switch`

Once (Flowgraph Node)

- **Node Name:** `Once`

On this page

OverviewPin SchemaInput PinsOutput PinsBehaviorHow It WorksExample UsageAdditional MethodsC:_onDeserialized(res)C:_onSerialize(res)See Also