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

Sequencer (Flowgraph Node)

- **Node Name:** `Sequencer`

Overview

  • Node Name: Sequencer
  • Category: logic
  • File: extensions/flowgraph/nodes/logic/sequencer.lua

Sequences flow across multiple output pins using configurable modes (loop, random, once, pingpong) and increment strategies (auto, manual, select).

Pin Schema

Input Pins

PinTypeDescription
flowflowInflow for this node

In manual mode, additional pins appear: next (flow), reset (flow), count (number). In select mode: index (number).

Output Pins

PinTypeDescription
flowflowOutflow for this node
currentIndexnumberCurrent index in the sequence (hidden)
maxIndexnumberMaximum index (hidden)
totalIndexnumberTotal unrestrained index (hidden)
value_1flowFlow output for index 1

Additional value_N output pins are created via the Count property.

Sequence Modes

ModeDescription
loopWraps around: 1 + ((index-1) % count)
randomRandom index each step
oncePlays through once without wrapping
pingpongBounces back and forth: 1→2→3→2→1→...

Increment Modes

ModeDescription
autoIndex increments every frame automatically
manualIndex advances via next pin, resets via reset pin
selectIndex is directly set from the index input pin

Behavior

  • init() - Sets count=1, mode=loop, incMode=auto, index=1.
  • _executionStarted() - Resets index to 0.
  • work() - Increments index based on increment mode, applies sequence mode function, and activates the matching output pin. Only one value_N pin is true at a time.
  • updatePins(old, new) - Adds/removes value_N output pins.
  • updateMode(m) - Adds/removes mode-specific input pins (next, reset, count, index).

How It Works

Each frame (or manual trigger), the index advances. The sequence mode function maps the raw index to an output slot number. Only the matching value_N pin outputs true. The currentIndex output shows which slot is active, while totalIndex shows the raw counter.

Example Usage

-- Cycle through 3 camera angles every frame:
-- count = 3, mode = loop, incMode = auto
-- value_1, value_2, value_3 fire in sequence: 1,2,3,1,2,3,...

-- Random dialogue selection:
-- count = 4, mode = random, incMode = manual
-- Connect "next" to a button press
-- Each press randomly selects one of 4 dialogue outputs

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

C:drawCustomProperties()

Custom ImGui drawing for the node's properties panel in the editor.

C:drawMiddle(builder, style)

Custom ImGui drawing in the middle section of the node in the editor.

Parameters:

  • builder
  • style

See Also

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

Select (Flowgraph Node)

- **Node Name:** `Select`

Switch Case (Flowgraph Node)

- **Node Name:** `Switch Case`

On this page

OverviewPin SchemaInput PinsOutput PinsSequence ModesIncrement ModesBehaviorHow It WorksExample UsageAdditional MethodsC:_onDeserialized(res)C:_onSerialize(res)C:drawCustomProperties()C:drawMiddle(builder, style)See Also