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

Wait (Flowgraph Node)

- **Node Name:** `Wait`

Overview

  • Node Name: Wait
  • Category: logic
  • Behaviour: {duration = true, once = true}
  • File: extensions/flowgraph/nodes/logic/wait.lua

Delays flow by a specified time duration. Once flow arrives, waits the configured number of seconds before passing flow through. Requires constant flow input.

Pin Schema

Input Pins

PinTypeDescription
flowflowInflow for this node
resetflowResets the timer (impulse)
durationnumberTime to wait in seconds (default: 3, hardcoded)
useDtSimboolUse simulation dt instead of real dt (default: false, hidden)

Output Pins

PinTypeDescription
flowflowContinuous flow after wait completes
impulseflowOne-shot flow on wait completion (impulse)

Behavior

  • init(mgr, ...) - Resets timer to 0, not running.
  • _executionStarted() - Resets timer and running state.
  • work(args) - Clears impulse output. When flow starts and timer hasn't completed, begins timing. Reset pin clears the timer. Each frame, increments timer by dt (real or sim). When timer exceeds duration, outputs flow and fires the one-shot impulse.
  • updateTimer() - Adds dt to timer; when timer >= duration, stops running and fires impulse.
  • drawMiddle() - Shows a progress bar and reset button.

How It Works

The node starts timing when flow first arrives. It uses either real time (dtReal) or simulation time (dtSim) based on the useDtSim flag. Once the timer reaches the configured duration:

  • The flow output becomes active (stays active as long as input flow continues)
  • The impulse output fires once

The timer does not auto-reset - once complete, flow passes through continuously. Use the reset pin to restart the wait cycle.

Example Usage

-- Wait 5 seconds before showing a UI element:
-- duration = 5
-- flow → [Wait] → impulse → [Show UI]

-- Using simulation time (pauses when game pauses):
-- useDtSim = true
-- duration = 10
-- Waits 10 seconds of in-game time

Additional Methods

C:_onDeserialized(res)

Called after the node is deserialized (loaded from file). Restores runtime state from saved data.

Parameters:

  • res

See Also

  • And (Flowgraph Node) - Related reference
  • Boolean Expression (Flowgraph Node) - Related reference
  • Branch (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Timed Trigger (Flowgraph Node)

- **Node Name:** `Timed Trigger`

XOR (Flowgraph Node)

- **Node Name:** `Xor`

On this page

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