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 Sites / Zones (Flowgraph Node)

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

Overview

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

Selects randomized start and destination parking spots from zone-based lists for Garage-to-Garage missions. Tracks used spots to prevent repeats.

Pin Schema

Input Pins

PinTypeDescription
sitesDatatableSites data containing parkingSpots.byName
minDistnumberMinimum distance between start and end spots
maxDistnumberMaximum distance between start and end spots

Output Pins

PinTypeDescription
loadedflow (impulse)Fires once after spots are selected
startSpotstringSelected start parking spot name
endSpotstringSelected end parking spot name
startLocationstringZone name of the start location
endLocationstringZone name of the end location

Internals

  • self.usedStartSpots / self.usedEndSpots - arrays of used spot names. Persist across restarts (not cleared on _executionStarted).
  • self.state - 1 = select, 2 = clear impulse.
  • getSpotsInZones(sitesData, zoneNames) - local helper that filters parking spots by zone membership.
  • findEndSpotForStartingSpot(startSpot, possibleEndSpots) - shuffles candidates and returns the first one within the min/max distance range, or the closest over-distance fallback.

How It Works

  1. Retrieves mission.initialZones and mission.destinationZones from the activity (calls generateZoneLists() if missing).
  2. Finds parking spots belonging to each zone set.
  3. Resets used-spot tracking if all spots have been consumed.
  4. Filters out previously used spots for both start and end.
  5. Shuffles available start spots, picks the first one.
  6. Calls findEndSpotForStartingSpot to find an end spot within the distance constraints.
  7. Sorts zone data by priority (prio custom field) and outputs spot/zone names.

Lua Code Example

-- Wire in a Garage-to-Garage mission:
-- sitesFile → selectGarage2GarageZones (minDist=500, maxDist=3000)
--   .startSpot → navigation start
--   .endSpot → navigation destination
--   .startLocation / .endLocation → UI display

Key Dependencies

  • self.mgr.activity - mission instance with initialZones, destinationZones
  • sitesData.parkingSpots.byName - parking spot database
  • tableValuesAsLookupDict - BeamNG utility for set-from-array conversion

Additional Methods

C:resetData()

Node method.

C:work()

Main work function called each frame/tick when the node is active.

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

Select Garage Vehicle (Flowgraph Node)

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

Select Garage Spots (Flowgraph Node)

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

On this page

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