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
Route Distance (Flowgraph Node)Closest Road (Flowgraph Node)Custom Lua (Flowgraph Node)Distance Between (Flowgraph Node)Waypoints Distance (Flowgraph Node)File Exists (Flowgraph Node)Get First Element of Table (Flowgraph Node)Get Level Data (Flowgraph Node)Get Map Objects IDs by DynField (Flowgraph Node)Get Table Value By Key (Flowgraph Node)GHOST (Flowgraph Node)Hide Loading Screen (Flowgraph Node)Color HSV (Flowgraph Node)Line Point From Xnorm (Flowgraph Node)Load Level (Flowgraph Node)Load Project (Flowgraph Node)On Menu (Flowgraph Node)Perlin Noise (Flowgraph Node)Pop Action Map (Flowgraph Node)Get Project InfoPush Action MapRandom ColorRandom NumberRandom QuaternionRandom VectorRoad PropertiesGet Navgraph RouteRoute PositionTemplate NodeTimeTimed SequenceTo NumberTo StringWorld Editor Open

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 Extensionsflowgraphnodesutil

Load Level (Flowgraph Node)

- **Node Name:** `Load Level`

Overview

  • Node Name: Load Level
  • Category: (custom state machine)
  • File: extensions/flowgraph/nodes/util/loadLevel.lua

Loads a level by path. The path is relative to levels/ and automatically appends /info.json. Supports optional vehicle model/config spawning and custom loading screens.

Pin Schema

Input Pins

PinTypeDescription
flowflowInflow trigger
levelPathstringPath relative to levels/ (e.g., gridmap_v2)
modelstring (hidden)Spawn with a specific vehicle model
configstring (hidden)Spawn with a specific vehicle config

Output Pins

PinTypeDescription
flowflowFires when level loading is complete

Internals

Key Methods

MethodDescription
init()Sets defaults: prevent player spawning, force level load, no custom loading screen
_executionStarted()Resets state machine to state 1
postInit()Populates level path dropdown with getAllLevelIdentifiers()
onLoadingScreenFadeout(missionFile)Callback when loading screen fades; transitions to state 3
work()Runs the state machine each frame
drawMiddle(builder, style)Shows current state number

State Machine

StateDescription
1Check - if level already loaded (and not forcing), skip to state 4. Otherwise start loading (state 2).
2Loading - core_levels.startLevel() has been called; waiting for completion callback.
3Buffer - loading done, counts down delayBufferFrames, then fires hooks and transitions to 4.
4Complete - sets flow output to true.

Node Data Properties

PropertyDefaultDescription
preventPlayerSpawningtruePrevents automatic player vehicle spawn
forceLevelLoadtrueForces reload even if the level is already loaded
delayBufferFrames0Extra frames to wait after loading before completing
stopRunningOnClientEndMissionfalseWhether to stop the flowgraph when the mission ends
noLoadInEdittrueSkip loading when in editor mode
customLoadingScreenfalseIf true, uses a delayed callback so you can manually hide the loading screen

How It Works

  1. State 1: Checks if the requested level is already the active mission. If so (and not forcing), jumps to complete. Otherwise calls core_levels.startLevel().
  2. When customLoadingScreen is enabled, a callback is passed to startLevel() that transitions to state 3 instead of auto-fading.
  3. State 3: Waits for delayBufferFrames countdown, then fires onClientPostStartMission and onClientStartMission hooks, calls map.assureLoad(), and moves to state 4.
  4. Optionally spawns a vehicle with the specified model/config via sanitizeVehicleSpawnOptions().

Usage Example

-- Simple level load:
-- [Button] → flow → [Load Level] levelPath="west_coast_usa"
--                     → flow → [Spawn Vehicle]

-- Custom loading screen workflow:
-- [Load Level] levelPath="italy" customLoadingScreen=true
--   → (waits for manual hide)
-- [Do Setup] → [Hide Loading Screen] → finished → [Continue]

Key Dependencies

  • core_levels.startLevel() - engine function to load a level
  • getMissionFilename() - returns the current level's mission file
  • getAllLevelIdentifiers() - lists available levels
  • spawn.preventPlayerSpawning - controls automatic vehicle spawning
  • map.assureLoad() - ensures map data is refreshed after level switch

See Also

  • Route Distance (Flowgraph Node) - Related reference
  • Closest Road (Flowgraph Node) - Related reference
  • Custom Lua (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Line Point From Xnorm (Flowgraph Node)

- **Node Name:** `Line Point From Xnorm`

Load Project (Flowgraph Node)

- **Node Name:** `Load Project`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsKey MethodsState MachineNode Data PropertiesHow It WorksUsage ExampleKey DependenciesSee Also