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
ARunForLife (Flowgraph Node)Clear Lights Drag Race (Flowgraph Node)Countdown Lights Controller (Flowgraph Node)Get Custom Vehicle Data (Flowgraph Node)Get Mission Setup Data (Flowgraph Node)Check Players Position / Go To Start Line (Flowgraph Node)KnockAway Check (Flowgraph Node)Lights Controller (Flowgraph Node)Mission Post Clean (Flowgraph Node)Mission Cleanup / Pre Clean (Flowgraph Node)Prepare Vehicle (Flowgraph Node)Remove Stashed Player Vehicle (Flowgraph Node)Select Garage Vehicle (Flowgraph Node)Select Garage Sites / Zones (Flowgraph Node)Select Garage Spots (Flowgraph Node)Select Heist Spots (Flowgraph Node)Set Stage Lights (Flowgraph Node)Update Display Drag Race (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 Extensionsflowgraphnodesmission

Select Garage Vehicle (Flowgraph Node)

- **Node Name:** `Select Garage Vehicle`

Overview

  • Node Name: Select Garage Vehicle
  • Category: once_instant
  • File: extensions/flowgraph/nodes/mission/selectGarage2GarageVehicle.lua
  • Icon: Vehicle icon
  • Color: Vehicle color

Selects a random vehicle configuration from available mission options, with used-config tracking to avoid repeats until all configs have been used.

Pin Schema

Input Pins

None (reads vehicle options from the mission instance).

Output Pins

PinTypeDescription
loadedflow (impulse)Fires once after a vehicle is selected
modelstringSelected vehicle model name
configstringSelected vehicle config name
namestringFormatted vehicle name for UI display

Internals

  • self.usedConfigs - {[model] = {[config] = true}} lookup table tracking already-used configurations. Persists across execution restarts (not cleared on _executionStarted).
  • self.state - two-phase state machine: 1 = select, 2 = clear impulse.
  • getAllAvailableConfigs(vehicleOptions) - local helper that flattens the mission's vehicleOptions list into {model, config, name} entries.

How It Works

  1. On first work() call (state 1):
    • Retrieves mission.vehicleOptions from the activity, calling generateVehicleOptions() if needed.
    • Builds the full list of available configs.
    • If all configs have been used, resets usedConfigs and re-seeds the RNG.
    • Filters out used configs, picks a random one from the remainder.
    • Outputs model, config, name and fires the loaded impulse.
    • Advances to state 2.
  2. On subsequent calls (state 2): clears the loaded impulse.

Lua Code Example

-- Garage-to-Garage mission flowgraph:
-- selectGarage2GarageVehicle.loaded → spawnVehicle (model, config from outputs)
-- Each mission attempt gets a different vehicle until all are exhausted.

Key Dependencies

  • self.mgr.activity - current mission instance
  • mission.vehicleOptions / mission:generateVehicleOptions() - vehicle option data
  • math.random, math.randomseed - randomization

Additional Methods

C:init()

Initializes the node, setting up pins and default properties.

C:resetData()

Node method.

C:workOnce()

Called once when the node is triggered (flow-once execution).


See Also

  • ARunForLife (Flowgraph Node) - Related reference
  • Update Display Drag Race (Flowgraph Node) - Related reference
  • Clear Lights Drag Race (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Remove Stashed Player Vehicle (Flowgraph Node)

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

Select Garage Sites / Zones (Flowgraph Node)

- **Node Name:** `Select Garage Sites`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsHow It WorksLua Code ExampleKey DependenciesAdditional MethodsC:init()C:resetData()C:workOnce()See Also