RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager
Flowgraph Base WindowFlowgraph EventsFlowgraph ExamplesFlowgraph Execution (Task Manager)Flowgraph Garbage DebugFlowgraph HistoryFlowgraph LegendFlowgraph Main WindowFlowgraph Mission Variable HelperFlowgraph Node LibraryFlowgraph Node PreviewFlowgraph OverviewFlowgraph Project SettingsFlowgraph PropertiesFlowgraph References WindowFlowgraph Search WindowFlowgraph State View WindowFlowgraph Variables WindowFlowgraph Welcome Window

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 Extensionseditorflowgraph

Flowgraph Mission Variable Helper

Shared utility module for applying mission variables from the Mission Editor to flowgraph managers before execution.

Shared utility module for applying mission variables from the Mission Editor to flowgraph managers before execution.


Overview

missionVariableHelper provides two key functions: checking whether a flowgraph manager's saved path matches a selected mission, and applying that mission's missionTypeData variables to the manager's variable system. It also injects the player vehicle ID into common variable names (playerID, vehID, etc.).


Public Functions

FunctionReturnsDescription
M.checkMissionMatch(mgr, selectedMission)matchType, mgrPath, missionPathCompare manager path against mission flowgraph path
M.applyMissionVariablesToManager(mgr, logTag)boolApply all mission variables + vehicle ID to manager

Match Types

TypeMeaning
"exact"Manager path exactly matches mission flowgraph path
"missionTypeMain"Manager is the mission type's main flowgraph
"sameMissionType"Manager is in the same mission type folder
"differentMissionType"Manager is from a different mission type
"noMission"No mission selected or no manager

Variable Injection

The helper applies variables in two passes:

  1. Mission variables: Iterates selectedMission.missionTypeData and calls mgr.variables:changeBase(name, value) for each existing variable
  2. Vehicle ID injection: Checks for playerID, playerId, vehID, vehId variables and injects the current player vehicle ID

Usage Example

local missionVarHelper = require('/lua/ge/extensions/editor/flowgraph/missionVariableHelper')

-- Check match type
local matchType = missionVarHelper.checkMissionMatch(mgr, selectedMission)

-- Apply variables before starting execution
local applied = missionVarHelper.applyMissionVariablesToManager(mgr, "myModule")
if applied then
  log("I", "", "Mission variables applied successfully")
end
mgr:setRunning(true)

See Also

  • Flowgraph Base Window - Related reference
  • Flowgraph Events - Related reference
  • Flowgraph Examples - Related reference
  • World Editor Guide - Guide

Flowgraph Main Window

The primary flowgraph editor window: renders graph tabs, the node canvas, toolbar controls, context menus, and execution controls.

Flowgraph Node Library

The node library window and context menu for browsing, searching, and creating flowgraph nodes, variables, macros, and states.

On this page

OverviewPublic FunctionsMatch TypesVariable InjectionUsage ExampleSee Also