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
Route Distance (Flowgraph Node)Closest Road (Flowgraph Node)Custom Lua (Flowgraph Node)Distance Between (Flowgraph Node)Waypoints Distance (Flowgraph Node)File Exists (Flowgraph Node)Get First Element of Table (Flowgraph Node)Get Level Data (Flowgraph Node)Get Map Objects IDs by DynField (Flowgraph Node)Get Table Value By Key (Flowgraph Node)GHOST (Flowgraph Node)Hide Loading Screen (Flowgraph Node)Color HSV (Flowgraph Node)Line Point From Xnorm (Flowgraph Node)Load Level (Flowgraph Node)Load Project (Flowgraph Node)On Menu (Flowgraph Node)Perlin Noise (Flowgraph Node)Pop Action Map (Flowgraph Node)Get Project InfoPush Action MapRandom ColorRandom NumberRandom QuaternionRandom VectorRoad PropertiesGet Navgraph RouteRoute PositionTemplate NodeTimeTimed SequenceTo NumberTo StringWorld Editor Open

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 Extensionsflowgraphnodesutil

Timed Sequence

- **Node Name:** `Timed Sequence`

Overview

  • Node Name: Timed Sequence
  • Category: once_f_duration
  • File: extensions/flowgraph/nodes/util/timedSequence.lua

Runs a configurable sequence of timed sections in order. Each section has a duration, and the node outputs flow signals when each section starts, is active, and completes. Finishes after all sections are done.

Pin Schema

Dynamic Pins (per section i)

Input Pins

PinTypeDefaultDescription
duration_inumber5Duration of section i in seconds (hardcoded)

Output Pins

PinTypeDescription
start_iflowImpulse when section i begins
active_iflowActive flow while section i is running
complete_iflowImpulse when section i is completed

Pins are dynamically created/removed based on the section count set in properties.

Internals

Key Methods

MethodDescription
init()Initializes counters and timing state
postInit()Sets up initial pin count (default 1 section)
_executionStarted()Resets all timing state
drawCustomProperties()ImGui UI to change section count
updatePins(old, new)Adds or removes pin groups for sections
workOnce()Starts the timed sequence
work()Advances time, tracks current section, fires flow signals
onNodeReset()Resets time and duration state

Timing Logic

  1. On start, computes total endTime by summing all section durations.
  2. Each frame, increments self.time by self.mgr.dtSim.
  3. Iterates through sections, accumulating elapsed time to find the current active section.
  4. Fires start_i impulse on section transitions, active_i while current, and complete_i on completion.
  5. Sets duration state to 'finished' when total time is reached.

Serialization

Saves and restores count and mode. On deserialization, rebuilds dynamic pins via updatePins().

How It Works

  1. Configure the number of sections in the property panel.
  2. Set a duration for each section.
  3. When flow arrives, the sequence begins (workOnce → started).
  4. The node tracks elapsed simulation time and transitions through sections.
  5. Each section fires start, active, and complete flow signals at appropriate times.
  6. After the last section completes, the node's duration state becomes finished.

Usage Example

-- 3-section countdown sequence:
-- Section 1: duration_1 = 3 (3 second "ready")
-- Section 2: duration_2 = 2 (2 second "set")  
-- Section 3: duration_3 = 1 (1 second "go")
-- Connect start_1 → display "Ready"
-- Connect start_2 → display "Set"
-- Connect start_3 → display "Go!"
-- Connect complete_3 → start race logic

-- Use active_i for continuous effects during a section
-- Use start_i for one-shot triggers at section boundaries

Key Dependencies

  • self.mgr.dtSim - simulation delta time for advancing the sequence

See Also

  • Route Distance (Flowgraph Node) - Related reference
  • Closest Road (Flowgraph Node) - Related reference
  • Custom Lua (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Time

- **Node Name:** `Time`

To Number

- **Node Name:** `To Number`

On this page

OverviewPin SchemaDynamic Pins (per section i)Input PinsOutput PinsInternalsKey MethodsTiming LogicSerializationHow It WorksUsage ExampleKey DependenciesSee Also