RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Crawl BoundariesCrawl Flowgraph BridgeCrawl DebugCrawl UI DisplayCrawl Flowgraph BridgeCrawl SystemCrawl Save SystemCrawl Engine

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 Extensionsgameplaycrawl

Crawl Flowgraph Bridge

Reference for `gameplay_crawl_flowgraphBridge`, the current bridge between the crawl system and flowgraph nodes. Exposes crawl lifecycle operations for mission flowgraphs.

Reference for gameplay_crawl_flowgraphBridge, the current bridge between the crawl system and flowgraph nodes. Exposes crawl lifecycle operations for mission flowgraphs.


Overview

This is the updated flowgraph bridge (vs. crawlFlowgraphBridge). Instead of maintaining its own state, it delegates to gameplay_crawl_general and gameplay_crawl_utils directly, querying the active crawler from shared state.


Dependencies

gameplay_crawl_saveSystem, gameplay_crawl_general, gameplay_crawl_utils, gameplay_crawl_boundary, gameplay_crawl_display


Exports

| Function | Signature | Description | |------ | M.dependencies | table | { 'gameplay_crawl_saveSystem', 'gameplay_crawl_general', 'gameplay_crawl_utils', |----|-----------|-------------| | loadCrawlTrail | (trailId) | Load a trail by ID | | setupCrawl | (vehicleId, trail) | Setup crawl without starting (calls general.setupCrawl) | | startCrawl | (vehicleId, trail) | Start or resume a crawl | | stopCrawl | () | Stop the active crawl | | resetCrawl | () | Reset crawler position and data | | getCrawlEndData | () | Get completion data | | getCrawlRuntimeData | () | Get live state data | | getTrailInfo | (trailId) | Get trail metadata | | isCrawlActive | () | Check if crawl is active | | getActiveCrawlerId | () | Get active crawler vehicle ID | | getAllTrails | () | List all trails | | getAllStartingPositions | () | List all starting positions | | getPlayerTrailStats | (trailId) | Get player's best scores | | getDynamicObjectsFromPrefab | (prefabId, dynamicName) | Find dynamic objects | | applyPenalty | (penaltyType) | Apply a penalty to the active crawler | | getPenaltyTypes | () | Get available penalty type names | | getLastRecoveryCheckpoint | () | Get last recovery checkpoint data | | getLastRecoveryCheckpointIndex | () | Get last recovery checkpoint index | | setRecoveryCheckpoint | (checkpoint) | Set a manual recovery checkpoint | | cleanup | () | Stop crawl and clear state |


Key Differences from crawlFlowgraphBridge

FeaturecrawlFlowgraphBridgeflowgraphBridge
State managementInternal bridgeStateDelegates to general.activeTrail
Active crawlerTracked internallyQueried from utils.getAllCrawlStates()
Setup/StartCombined in configureCrawl+startCrawlSeparate setupCrawl and startCrawl
Resume supportNoYes - resumes paused timer

How It Works

-- Two-step setup: configure then start
local trail = gameplay_crawl_flowgraphBridge.loadCrawlTrail(trailId)
gameplay_crawl_flowgraphBridge.setupCrawl(vehicleId, trail)
gameplay_crawl_flowgraphBridge.startCrawl(vehicleId, trail)

-- Query live state
local data = gameplay_crawl_flowgraphBridge.getCrawlRuntimeData()
-- data.currentTime, data.points, data.isCompleted, etc.

-- Stop and cleanup
gameplay_crawl_flowgraphBridge.cleanup()

Start Crawl Logic

startCrawl has three paths:

  1. Resume - If an active crawl exists but hasn't started its timer, resume it
  2. Continue - If no trail provided but general.activeTrail exists, use that
  3. Fresh start - Setup and start a new crawl via general.startCrawlFlowgraph

Key Behaviors

  • getActiveCrawlerId() finds the first active crawler in getAllCrawlStates()
  • resetCrawl() teleports the vehicle to the starting position and clears state
  • If a crawl is already active when setupCrawl is called, the existing crawl is stopped first
  • Hooks into onCrawlStarted, onCrawlResultsShown, onCrawlPathnodeReached (currently no-op)

Module Variables

VariableTypeDescription
M.dependenciestable{ 'gameplay_crawl_saveSystem', 'gameplay_crawl_general', 'gameplay_crawl_utils',
M.applyPenalty(penaltyType)-
M.cleanup()-
M.getActiveCrawlerId()-
M.getAllStartingPositions()-
M.getAllTrails()-
M.getCrawlEndData()-
M.getCrawlRuntimeData()-
M.getDynamicObjectsFromPrefab(prefabId, dynamicName)-
M.getLastRecoveryCheckpoint()-
M.getLastRecoveryCheckpointIndex()-
M.getPenaltyTypes()-
M.getPlayerTrailStats(trailId)-
M.getTrailInfo(trailId)-
M.isCrawlActive()-
M.loadCrawlTrail(trailId)-
M.onCrawlPathnodeReached(eventData)-
M.onCrawlResultsShown(eventData)-
M.onCrawlStarted()-
M.resetCrawl()-
M.setRecoveryCheckpoint(checkpoint)-
M.setupCrawl(vehicleId, trail)-
M.startCrawl(vehicleId, trail)-
M.stopCrawl()-

See Also

  • crawl/boundary - Crawl Boundary System - Related reference
  • crawl/crawlFlowgraphBridge - Crawl Flowgraph Bridge (Legacy) - Related reference
  • crawl/debug - Crawl Debug Window - Related reference
  • Gameplay Systems Guide - Guide

Crawl UI Display

Reference for `gameplay_crawl_display`, which provides UI message functions for the crawl (rock crawling) system. Handles all player-facing notifications during crawl gameplay.

Crawl System

Reference for `gameplay_crawl_general`, the main manager for rock crawling trails. Handles trail setup, crawl lifecycle, POI registration, big map integration, activity dialogs, and score persistence.

On this page

OverviewDependenciesExportsKey Differences from crawlFlowgraphBridgeHow It WorksStart Crawl LogicKey BehaviorsModule VariablesSee Also