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
Collection Marker (Flowgraph Node)Custom Lua Command (Flowgraph Node)Get Object Field (Flowgraph Node)Get Player Vehicle ID (Flowgraph Node)Get Point on Decalroad (Flowgraph Node)Show/Hide Object (Flowgraph Node)ID by Name (Flowgraph Node)Keep Prefab (Flowgraph Node)Particle Emitter (Flowgraph Node)Point on Decalroad (Flowgraph Node)Raceline Parking (Flowgraph Node)Raycast (Flowgraph Node)Parking Markers / Rect Marker (Flowgraph Node)Reload Collision (Flowgraph Node)Reload Nav Graph (Flowgraph Node)Remove Prefab (Flowgraph Node)Reset Prefab (Flowgraph Node)Set Object Field (Flowgraph Node)Sevensegment Display (Flowgraph Node)Single Marker (Flowgraph Node)Spawn Light / SpotLight (Flowgraph Node)Spawn Prefab (Flowgraph Node)Spawn TSStatic (Flowgraph Node)Store Statics (Flowgraph Node)Track Prefab (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 Extensionsflowgraphnodesscene

Get Player Vehicle ID (Flowgraph Node)

- **Node Name:** `Get Player Vehicle ID`

Overview

  • Node Name: Get Player Vehicle ID
  • Category: provider
  • File: extensions/flowgraph/nodes/scene/getPlayerVehicle.lua

Gets the numeric ID of the vehicle currently controlled by the player.

Pin Schema

Output Pins

PinTypeDescription
vehIdnumberId of the vehicle the player currently controls (-1 if none)
existboolWhether the player has an active vehicle (hidden)

Legacy Pin Mapping

Old NameNew Name
objIDvehId

Behavior

  • work() - Each frame, queries be:getPlayerVehicleID(0). Outputs the ID or -1 if no vehicle exists. Sets exist to true if the ID is not -1.

Key Dependencies

  • be:getPlayerVehicleID(playerIndex) - Returns the player's current vehicle ID, or -1

How It Works

A provider node (no flow pins needed) that continuously outputs the player's vehicle ID. The exist output is a convenience boolean for branching logic. Returns -1 when no vehicle is spawned.

Example Usage

-- Wire vehId to any node that needs the player vehicle ID
-- Use exist output to guard against no-vehicle scenarios
-- Common pattern: wire to Get Object Field to read vehicle properties
-- Or wire to camera nodes that need a vehicle reference

Additional Methods

C:init()

Initializes the node, setting up pins and default properties.


See Also

  • Collection Marker (Flowgraph Node) - Related reference
  • Custom Lua Command (Flowgraph Node) - Related reference
  • Get Object Field (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Get Object Field (Flowgraph Node)

- **Node Name:** `Get Object Field`

Get Point on Decalroad (Flowgraph Node)

- **Node Name:** `Get Point on Decalroad`

On this page

OverviewPin SchemaOutput PinsLegacy Pin MappingBehaviorKey DependenciesHow It WorksExample UsageAdditional MethodsC:init()See Also