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

On Vehicle Reset

- **Node Name:** `On Vehicle Reset`

Overview

  • Node Name: On Vehicle Reset
  • Category: logic
  • File: extensions/flowgraph/nodes/vehicle/onVehicleReset.lua

Detects when a vehicle is reset (repaired/respawned). Can optionally filter to a specific vehicle ID. Fires an impulse with the reset vehicle's ID.

Pin Schema

Input Pins

PinTypeDescription
flowflowInflow for this node
vehIdnumberIf set, only triggers for this specific vehicle

Output Pins

PinTypeDescription
flowflow (impulse)Fires once when a vehicle is reset
vehIdnumber (hidden)ID of the vehicle that was reset

Legacy Pin Mapping

  • in.vehicleID → vehId
  • out.vehicleID → vehId

Internals

Key Methods

MethodDescription
init()Empty initialization
_executionStarted()Resets flag and info table
onVehicleResetted(id)Hook - stores vehicle ID if it matches the filter (or no filter set)
work()If flag is set, outputs vehicle ID and fires impulse flow, then clears flag
_afterTrigger()Clears the flag for single-frame impulse

How It Works

  1. The node listens to the onVehicleResetted hook.
  2. When a vehicle is reset, it checks whether an input vehId filter is set.
    • If a filter is set, only triggers when the reset vehicle matches.
    • If no filter, triggers for any vehicle reset.
  3. On the next work() tick, outputs the vehicle ID and fires the flow impulse.
  4. The flag is cleared in both work() and _afterTrigger().

Usage Example

-- In a flowgraph - detect when the player resets their car:
-- [Get Player Vehicle] → (vehId) → [On Vehicle Reset].vehId
-- [On Vehicle Reset] → (flow) → [Penalty / Timer Reset / etc.]

-- The engine hook signature:
-- onVehicleResetted(vehicleId)

Key Dependencies

  • onVehicleResetted engine hook - fires when a vehicle is reset (note the double-t spelling)

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

On Vehicle Destroyed

- **Node Name:** `On Vehicle Destroyed`

On Vehicle Spawned

- **Node Name:** `On Vehicle Spawned`

On this page

OverviewPin SchemaInput PinsOutput PinsLegacy Pin MappingInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also