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

Remove Vehicle

- **Node Name:** `Remove Vehicle`

Overview

  • Node Name: Remove Vehicle
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/vehicle/removeVehicle.lua

Removes a vehicle from the scene by deleting its scene object. Notifies the editor if present.

Pin Schema

Input Pins

PinTypeDefaultDescription
vehIdnumbernilID of the vehicle to remove

Internals

Key Methods

MethodDescription
work()Finds vehicle by ID, notifies editor, and deletes the object

How It Works

  1. Looks up the vehicle by vehId using scenetree.findObjectById().
  2. If vehId is nil or 0, sets outflow to true but does nothing else (player vehicle fallback is commented out).
  3. If the editor is active, calls editor.onRemoveSceneTreeObjects({id}) to notify it.
  4. Calls source:delete() to permanently remove the vehicle from the scene.

Usage Example

-- In a flowgraph - remove a specific vehicle:
-- [Vehicle ID Source] → (vehId) → [Remove Vehicle]

-- Direct Lua equivalent:
local veh = scenetree.findObjectById(vehId)
if veh then
  if editor and editor.onRemoveSceneTreeObjects then
    editor.onRemoveSceneTreeObjects({veh:getId()})
  end
  veh:delete()
end

Key Dependencies

  • scenetree.findObjectById() - resolves vehicle ID to scene object
  • editor.onRemoveSceneTreeObjects() - editor notification for scene tree cleanup
  • obj:delete() - permanently removes the object from the scene

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

Recover In Place

- **Node Name:** `Recover In Place`

Timeline Replay

- **Node Name:** `Timeline Replay`

On this page

OverviewPin SchemaInput PinsInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also