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

Shift to Gear Index

- **Node Name:** `Shift to Gear Index`

Overview

  • Node Name: Shift to Gear Index
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/vehicle/shiftToGearIndex.lua

Shifts a vehicle to a specific gear index. Intended for vehicles with a manual gearbox. Behavior is undefined for automatic gearboxes or out-of-range gear indices.

Pin Schema

Input Pins

PinTypeDescription
vehIdnumberID of the vehicle to affect. If empty, uses player vehicle
gearnumberGear index: 0 = Neutral, -1 = Reverse, 1 = First, 2 = Second, etc.

Internals

Key Methods

MethodDescription
work()Resolves vehicle and executes shiftToGearIndex action via vehicle bridge

How It Works

  1. On each tick, resolves the vehicle by vehId or falls back to getPlayerVehicle(0).
  2. Calls core_vehicleBridge.executeAction(veh, 'shiftToGearIndex', gear) with the specified gear index.
  3. Gear indices: -1 = reverse, 0 = neutral, 1+ = forward gears.

Usage Example

-- In a flowgraph - shift to first gear:
-- [Vehicle ID] → [Shift to Gear Index].vehId
-- [Number: 1]  → [Shift to Gear Index].gear

-- Direct Lua equivalent:
local veh = getPlayerVehicle(0)
core_vehicleBridge.executeAction(veh, 'shiftToGearIndex', 1)   -- first gear
core_vehicleBridge.executeAction(veh, 'shiftToGearIndex', 0)   -- neutral
core_vehicleBridge.executeAction(veh, 'shiftToGearIndex', -1)  -- reverse

Key Dependencies

  • core_vehicleBridge.executeAction(veh, action, ...) - sends actions to the vehicle Lua environment
  • scenetree.findObjectById() - resolves vehicle by ID
  • getPlayerVehicle(0) - gets the current player vehicle

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

Set Lights

- **Node Name:** `Set Lights`

Spawn Vehicle

- **Node Name:** `Spawn Vehicle`

On this page

OverviewPin SchemaInput PinsInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also