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
Align For CouplingApply Velocity to VehicleBoost VehicleSet Vehicle ColorsCustom Parts Config ProviderEnter VehicleFlip UprightFreeze VehicleGenerate License PlateGet Vehicle ActiveGet Electrics ValueGet GearboxmodeGet Powertrain DataGravity ForceDistance From GroundHas Coupler TagIs CoupledIs Player UsableKeep VehicleMove Vehicle ToOn Cannon FiredOn Vehicle DestroyedOn Vehicle ResetOn Vehicle SpawnedOn Vehicle SwitchedPlayer UsableRandom Config ProviderRecover In PlaceRemove VehicleTimeline ReplaySet Vehicle ActiveSet Gearbox ModeSet IgnitionSet License PlateSet LightbarSet LightsShift to Gear IndexSpawn VehicleVehicle StatesTeleport To Last RoadToggle Vehicle ControlsMove To ShowroomVehicle TouchProps TouchStatic Object TouchTrack VehicleTrailer Respawn ControlVehicle Config ProviderGet Vehicle DataGet Vehicle DataGet Vehicle BoundsVehicle PingGet Vehicle Wheel Center

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 Extensionsflowgraphnodesvehicle

Vehicle States

- **Node Name:** `Vehicle States`

Overview

  • Node Name: Vehicle States
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/vehicle/states.lua

Reads the current state of a vehicle (horn active, lightbar active) from the map.objects data and outputs flow/bool signals accordingly.

Pin Schema

Input Pins

PinTypeDescription
vehIdnumberID of the vehicle to query states for.

Output Pins

PinTypeDescription
hornflowActive when the vehicle's horn is on.
lightbarflowActive when the vehicle's lightbar is on.
hornbboolBoolean: is the horn active? (hidden)
lightbarbboolBoolean: is the lightbar active? (hidden)

Internals

Key Methods

MethodDescription
work()Reads map.objects[vehId].states and sets horn/lightbar outputs.

How It Works

  1. Each frame, looks up the vehicle in map.objects by ID.
  2. Reads the states table from the map object data.
  3. Sets flow and boolean output pins for horn and lightbar based on truthiness of the state values.
  4. If the vehicle is not found in the map, outputs default to false.

Usage Example

-- Flowgraph:
-- [Vehicle ID] → vehId → [Vehicle States]
--                              ↓ horn
--                         [Play Horn Sound Effect]
--                              ↓ lightbar
--                         [Activate Mission Checkpoint]

-- Checking vehicle states in regular GE Lua:
local states = map.objects[vehId].states
if states.horn then
  -- horn is active
end

Key Dependencies

  • map.objects - global map object data containing vehicle states

See Also

  • Align for Coupling (Flowgraph Node) - Related reference
  • Apply Velocity to Vehicle (Flowgraph Node) - Related reference
  • Boost Vehicle (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Spawn Vehicle

- **Node Name:** `Spawn Vehicle`

Teleport To Last Road

- **Node Name:** `Teleport To Last Road`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also