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
Get Custom Vehicle ValueCustom vlua - deprecatedCustom Vehicle LuaVehicle ActionWheel Distance

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 Extensionsflowgraphnodesvehiclespecial

Vehicle Action

- **Node Name:** `Vehicle Action`

Overview

  • Node Name: Vehicle Action
  • Category: repeat_p_duration
  • File: extensions/flowgraph/nodes/vehicle/special/vehicleAction.lua

Calls a vehicle action defined in input_actions.json - simulating key-presses (onDown/onChange/onUp) on a vehicle's action map from the flowgraph.

Pin Schema

Input Pins

PinTypeDescription
vehIdnumberID of the vehicle that receives the action.
valnumberVALUE parameter substituted into the action command.
inputFilternumberFILTERTYPE parameter (hidden, default 0).
anglenumberANGLE parameter (hidden, default 0).
downflowSimulates the "onDown" key press.
changeflowSimulates the "onChange" event.
upflowSimulates the "onUp" key release.

Internals

Key Methods

MethodDescription
init()Initialises model/action state; defaults to "No Action".
loadActions(key, file)Reads input_actions.json for a vehicle model or the global vehicle actions file, caching results.
drawCustomProperties()Renders vehicle selector and action combo box in the editor UI.
formatCommand(cmd)Replaces VALUE, FILTERTYPE, ANGLE placeholders in action command strings with pin values.
work()Finds the vehicle and queues the appropriate Lua command(s) based on which flow pins are active.
_onSerialize(res)Saves model, vehType, modelName, and action data.
_onDeserialized(nodeData)Restores serialised state.

Static Cache

  • vehicleActionMaps - module-level table caching loaded action maps keyed by model name or 'allVehicles'.

How It Works

  1. In the editor, the user selects a vehicle model and picks an action from its input_actions.json.
  2. The global vehicle actions from lua/ge/extensions/core/input/actions/vehicle.json are always available.
  3. At runtime, when down, change, or up flow pins fire, the node formats the corresponding command string (replacing VALUE, FILTERTYPE, ANGLE) and sends it to the vehicle via veh:queueLuaCommand().

Usage Example

-- Flowgraph setup:
-- 1. Place a "Vehicle Action" node
-- 2. Select model (e.g. "pickup") and load its actions
-- 3. Choose an action (e.g. "Toggle Headlights")
-- 4. Connect a trigger to the "down" pin
-- 5. Wire vehId from a vehicle provider

-- The node internally runs something like:
veh:queueLuaCommand("electrics.toggle_lights_state()")

Key Dependencies

  • ui_flowgraph_editor.vehicleSelector - editor helper for model/config selection
  • jsonReadFile() - reads input_actions.json files
  • veh:queueLuaCommand() - sends Lua to the vehicle VM

See Also

  • Get Custom Vehicle Value (Flowgraph Node) - Related reference
  • Custom Vehicle Lua (Flowgraph Node) - Related reference
  • Custom vlua - Deprecated (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Custom Vehicle Lua

- **Node Name:** `Custom Vehicle Lua`

Wheel Distance

- **Node Name:** `Wheel Distance`

On this page

OverviewPin SchemaInput PinsInternalsKey MethodsStatic CacheHow It WorksUsage ExampleKey DependenciesSee Also