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

Timed Trigger (Flowgraph Node)

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

Overview

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

Requires continuous input on the charge pin for a specified duration before triggering. Resets if charging stops for too long.

Pin Schema

Input Pins

PinTypeDescription
flowflowInflow for this node
chargeflowTimer charges while this pin has flow

Output Pins

PinTypeDescription
flowflowContinuous flow once charge duration is met
completeflowOne-shot impulse when charge completes

Data Properties

PropertyTypeDefaultDescription
durationnumber3Seconds of charging required to trigger
resetTimernumber1Seconds without charge before the timer resets

Behavior

  • init(mgr, ...) - Sets defaults: duration=3, resetTimer=1, timer=0.
  • work(args) - Updates charge state each frame. While charge has flow, increments timer by dtSim. When timer reaches duration, fires complete impulse once and keeps flow active. When charge stops, increments reset counter; if reset counter reaches resetTimer, the charge timer resets to 0.
  • _executionStopped() - Resets all state.
  • drawMiddle() - Shows two progress bars: charge progress and reset countdown.

How It Works

Think of this as a "hold to activate" mechanism. The player (or system) must sustain flow on the charge pin for the full duration. If charging is interrupted, a grace period (resetTimer) begins counting. If charging resumes before the grace period expires, progress is preserved. If the grace period expires, all progress is lost.

The complete pin fires exactly once when the charge first reaches the threshold. The flow pin remains active continuously after completion.

Example Usage

-- "Hold button for 3 seconds to confirm":
-- duration = 3, resetTimer = 1
-- charge = button held flow
-- complete → execute the confirmation action
-- If player releases for < 1 second, progress is kept
-- If released for > 1 second, starts 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

C:updateCharge()

Node method.


See Also

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

Switch Case (Flowgraph Node)

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

Wait (Flowgraph Node)

- **Node Name:** `Wait`

On this page

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