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
Align For CouplingApply Velocity to VehicleBoost VehicleSet Vehicle ColorsCustom Parts Config ProviderEnter VehicleFlip UprightFreeze VehicleGenerate License PlateGet Vehicle ActiveGet Electrics ValueGet GearboxmodeGet Powertrain DataGravity ForceDistance From GroundHas Coupler TagIs CoupledIs Player UsableKeep VehicleMove Vehicle ToOn Cannon FiredOn Vehicle DestroyedOn Vehicle ResetOn Vehicle SpawnedOn Vehicle SwitchedPlayer UsableRandom Config ProviderRecover In PlaceRemove VehicleTimeline ReplaySet Vehicle ActiveSet Gearbox ModeSet IgnitionSet License PlateSet LightbarSet LightsShift to Gear IndexSpawn VehicleVehicle StatesTeleport To Last RoadToggle Vehicle ControlsMove To ShowroomVehicle TouchProps TouchStatic Object TouchTrack VehicleTrailer Respawn ControlVehicle Config ProviderGet Vehicle DataGet Vehicle DataGet Vehicle BoundsVehicle PingGet Vehicle Wheel Center
AI ParametersAI ArriveAI ChaseAI Directly ToAI DisableAI FleeAI FollowAI Follow WaypointsGet AI ModeAI Go To The End LineAI RandomFollow DecalroadAI StopAI Traffic
AI Follow Path from DataAI Path from FileStored AI PathPlay ScriptAI Recording

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 ExtensionsflowgraphnodesvehicleaiscriptAI

Stored AI Path

- **Node Name:** `Stored AI Path`

Overview

  • Node Name: Stored AI Path
  • Category: provider
  • File: extensions/flowgraph/nodes/vehicle/ai/scriptAI/pathStored.lua

Stores a ScriptAI path directly within the flowgraph node. Paths can be loaded from the ScriptAI Manager editor tool and are serialized with the flowgraph. Outputs the path data for use with "AI Follow Path from Data".

Pin Schema

Output Pins

PinTypeDescription
pathtable (aiPath)The stored AI path data.

Internals

Key Methods

MethodDescription
init()Initializes empty aiPath array and selector state.
work()Outputs {path = self.aiPath} on the path pin.
drawCustomProperties()Editor UI - shows path element count, debug visualization, ScriptAI Manager integration, and recording selector.
drawDebugPath()Renders the stored path as purple square prisms in the 3D viewport (distance-culled).
_onSerialize(res)Saves the aiPath array.
_onDeserialized(nodeData)Restores the aiPath array.

How It Works

  1. The node stores an array of path waypoints ({x, y, z, t, dir?, up?}) directly in self.aiPath.
  2. In the editor, use the ScriptAI Manager to record a path, then click "Load Selected Recording into node."
  3. The path data persists with the flowgraph via serialization.
  4. work() wraps the array as {path = self.aiPath} matching the aiPath table type.

Debug Visualization

When the editor properties panel is open, the node draws the stored path in 3D:

  • Purple square prisms connect consecutive waypoints.
  • Points beyond 100–200m from the camera are culled for performance.

Usage Example

-- Flowgraph chain:
-- [Stored AI Path] → path → [AI Follow Path from Data (vehId, loopCount=1)] → flow → [Done]

-- The stored path format:
local aiPath = {
  {x = 100, y = 200, z = 50, t = 0.0},
  {x = 105, y = 205, z = 50, t = 1.2},
  -- ...
}

Key Dependencies

  • editor_scriptAIManager - ScriptAI Manager editor extension for recording paths
  • editor_scriptAIManager.getCurrentRecordings() - retrieves available recordings
  • Debug drawing: debugDrawer:drawSquarePrism() for path visualization

See Also

  • AI Follow Path from Data (Flowgraph Node) - Related reference
  • AI Path from File (Flowgraph Node) - Related reference
  • Play ScriptAI Recording (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

AI Path from File

- **Node Name:** `AI Path from File`

Play ScriptAI Recording

- **Node Name:** `Play ScriptAI Recording`

On this page

OverviewPin SchemaOutput PinsInternalsKey MethodsHow It WorksDebug VisualizationUsage ExampleKey DependenciesSee Also