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

Mission Post Clean (Flowgraph Node)

- **Node Name:** `Mission Post Clean`

Overview

  • Node Name: Mission Post Clean
  • Category: once_p_duration
  • File: extensions/flowgraph/nodes/mission/postClean.lua
  • Color: Mission blue (0.13, 0.3, 0.64, 0.75)

Cleans up after a mission ends. Optionally keeps the mission vehicle (instead of restoring the original player vehicle), recovers it in place, resets the starting position, and preserves traffic state.

Pin Schema

Input Pins

PinTypeHiddenDescription
keepVehboolnoIf true, keeps the mission vehicle and removes the stashed player vehicle
recoverInPlaceboolyes (hardcoded)Also teleport-recover the kept vehicle in place
resetStartPosboolyes (hardcoded)Move the original vehicle back to mission start position after mission stops
vehIdnumberyesID of the vehicle to keep; defaults to current player vehicle

Output Pins

None.

Internals

  • Uses self.mgr.activity to access the current mission instance.
  • Uses self.mgr.modules.mission for stashed-vehicle management and original player ID lookup.
  • Uses self.mgr.modules.vehicle to flag vehicles to keep after cleanup.
  • Uses self.mgr.modules.traffic to optionally preserve traffic state.

How It Works

  1. Keep vehicle logic - If keepVeh is true:
    • Resolves the vehicle by vehId or falls back to getPlayerVehicle(0).
    • If the kept vehicle differs from the original player vehicle, marks it as "keep" and removes the stashed player vehicle.
    • If recoverInPlace is true, teleports the vehicle to its current position with optional repair (skipped in career mode if the player uses their own inventory vehicle).
    • Unfreezes the vehicle via core_vehicleBridge.executeAction(veh, 'setFreeze', false).
  2. Reset start position - Sets mission.restoreStartingInfoSetup = true so the mission system repositions the original vehicle.
  3. Traffic preservation - If the mission's traffic setup has usePrevTraffic, sets keepTrafficState to prevent traffic from deactivating.

Lua Code Example

-- In a mission flowgraph, place postClean after the mission result:
-- missionResult → postClean (keepVeh = true)
-- This keeps the vehicle the player used during the mission
-- and removes any stashed original vehicle.

Key Dependencies

  • self.mgr.modules.mission - mission module (stash/restore/originalPlayerId)
  • self.mgr.modules.vehicle - vehicle keep management
  • core_vehicleBridge - vehicle action execution
  • spawn.safeTeleport - position recovery
  • career_modules_inventory - career vehicle ownership check

Additional Methods

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

Lights Controller (Flowgraph Node)

- **Node Name:** `Lights Controller`

Mission Cleanup / Pre Clean (Flowgraph Node)

- **Node Name:** `Mission Cleanup`

On this page

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