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

Keep Vehicle

- **Node Name:** `Keep Vehicle`

Overview

  • Node Name: Keep Vehicle
  • Category: once_instant
  • File: extensions/flowgraph/nodes/vehicle/keep.lua

Marks a vehicle to be kept after the flowgraph stops. By default, vehicles spawned during flowgraph runtime are removed when the flowgraph ends. This node overrides that behavior for a specific vehicle.

Pin Schema

Input Pins

PinTypeDescription
vehIdnumberID of the vehicle to affect
keepbooltrue to keep the vehicle after flowgraph stops, false to allow removal

Internals

Key Methods

MethodDescription
workOnce()Calls self.mgr.modules.vehicle:setKeepVehicle(vehId, keepValue) and forwards flow

How It Works

  1. When triggered, the node reads the vehicle ID and keep flag from input pins.
  2. If a valid vehId is provided, it calls self.mgr.modules.vehicle:setKeepVehicle(vehId, keep).
  3. This marks the vehicle in the flowgraph's vehicle module so it won't be cleaned up when the flowgraph execution ends.
  4. Flow is forwarded to the output.

Usage Example

-- In a flowgraph:
-- [Spawn Vehicle] → vehId → [Keep Vehicle (keep=true)] → [Continue]
-- The spawned vehicle will persist after the flowgraph stops.

-- To allow cleanup again:
-- [Keep Vehicle (keep=false)] ← vehId

-- Underlying call:
-- self.mgr.modules.vehicle:setKeepVehicle(vehId, true)

Key Dependencies

  • self.mgr.modules.vehicle:setKeepVehicle() - marks a vehicle for retention or cleanup in the flowgraph vehicle module

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

Is Player Usable

- **Node Name:** `Is Player usable`

Move Vehicle To

- **Node Name:** `Move Vehicle To`

On this page

OverviewPin SchemaInput PinsInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also