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
Collection Marker (Flowgraph Node)Custom Lua Command (Flowgraph Node)Get Object Field (Flowgraph Node)Get Player Vehicle ID (Flowgraph Node)Get Point on Decalroad (Flowgraph Node)Show/Hide Object (Flowgraph Node)ID by Name (Flowgraph Node)Keep Prefab (Flowgraph Node)Particle Emitter (Flowgraph Node)Point on Decalroad (Flowgraph Node)Raceline Parking (Flowgraph Node)Raycast (Flowgraph Node)Parking Markers / Rect Marker (Flowgraph Node)Reload Collision (Flowgraph Node)Reload Nav Graph (Flowgraph Node)Remove Prefab (Flowgraph Node)Reset Prefab (Flowgraph Node)Set Object Field (Flowgraph Node)Sevensegment Display (Flowgraph Node)Single Marker (Flowgraph Node)Spawn Light / SpotLight (Flowgraph Node)Spawn Prefab (Flowgraph Node)Spawn TSStatic (Flowgraph Node)Store Statics (Flowgraph Node)Track Prefab (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 Extensionsflowgraphnodesscene

Track Prefab (Flowgraph Node)

- **Node Name:** `Track Prefab`

Overview

  • Node Name: Track Prefab
  • Category: once_instant
  • File: extensions/flowgraph/nodes/scene/trackPrefab.lua

Allows the flowgraph to track a prefab that was spawned outside of the flowgraph system. Provides options to control cleanup behavior when the flowgraph stops.

Pin Schema

Input Pins

PinTypeDescription
flowflowStandard inflow
idnumberPrefab ID to track (default 0)
dontDeletebool(Hidden) If true, prefab won't be deleted on stop (default true)
skipNavgraphReloadbool(Hidden) If true, skip navgraph reload on stop (default true)
skipCollisionReloadbool(Hidden) If true, skip collision reload on stop (default true)

Behavior

  • workOnce() - Registers the prefab with the flowgraph's prefab module via mgr.modules.prefab:addPrefab(), passing cleanup options.

How It Works

  1. Fires once when triggered.
  2. Adds the externally-spawned prefab to the flowgraph's prefab tracking system.
  3. The cleanup options (dontDelete, skipNavgraphReload, skipCollisionReload) control what happens when the flowgraph execution ends:
    • By default, all three are true, meaning the prefab is preserved and no expensive reloads occur.
    • Set dontDelete to false to have the flowgraph clean up the prefab on stop.

Key Dependencies

  • self.mgr.modules.prefab:addPrefab(id, options) - registers a prefab for flowgraph lifecycle management

Additional Methods

C:_executionStopped()

Called when graph execution stops. Used for cleanup.


See Also

  • Collection Marker (Flowgraph Node) - Related reference
  • Custom Lua Command (Flowgraph Node) - Related reference
  • Get Object Field (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Store Statics (Flowgraph Node)

- **Node Name:** `Store Statics`

Camera Transform (Flowgraph Node)

- **Node Name:** `Camera Transform`

On this page

OverviewPin SchemaInput PinsBehaviorHow It WorksKey DependenciesAdditional MethodsC:_executionStopped()See Also