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

Spawn TSStatic (Flowgraph Node)

- **Node Name:** `Spawn TSStatic`

Overview

  • Node Name: Spawn TSStatic
  • Category: once_instant
  • File: extensions/flowgraph/nodes/scene/spawnTSStatic.lua

Creates and manages spawning TSStatic (static mesh) objects in the scene.

Pin Schema

Input Pins

PinTypeDescription
flowflowStandard inflow
resetflow (impulse)Clears all spawned objects
shapeNamestringShape file path (e.g., .dae or .dts)
positionvec3Object position
rotationquatObject rotation
scalevec3Object scale

Output Pins

PinTypeDescription
flowflowStandard outflow
createdflow (impulse)Fires when object is created
lastIdnumberID of the most recently created object

Internals

FieldDefaultPurpose
self.objects{}List of spawned TSStatic objects
self.data.maxObjectCount1Maximum objects to spawn

Behavior

  • workOnce() - Creates the TSStatic object on first trigger.
  • work() - Manages the created impulse flag (turns off after one frame).
  • createObject() - Creates a TSStatic, sets shape/position/scale/rotation, flags canSave = false, registers with a unique name, and adds to the objects list.
  • onNodeReset() - Deletes all spawned objects and clears the list.

How It Works

  1. On first trigger, workOnce() calls createObject() to spawn a TSStatic with the given shape and transform.
  2. The object is registered with a unique name (spawnedObj_<timestamp>_<nodeId>_<index>).
  3. The created impulse pin fires for exactly one frame after creation.
  4. All objects are cleaned up on execution stop, reset, mission end, or node destruction.

Example Usage

-- Spawn a barrier at a specific location:
-- shapeName = "art/shapes/objects/barrier_01.dae"
-- position = {100, 200, 50}
-- rotation = {0, 0, 0, 1}
-- scale = {1, 1, 1}

Key Dependencies

  • createObject("TSStatic") - engine function for creating static mesh objects
  • editor.onAddSceneTreeObjects() / onRemoveSceneTreeObjects() - editor scene tree integration

Additional Methods

C:_executionStopped()

Called when graph execution stops. Used for cleanup.

C:destroy()

Destroys the node and cleans up any created objects.

C:init(mgr, ...)

Initializes the node, setting up pins and default properties.

Parameters:

  • mgr
  • ...

C:onClientEndMission()

Cleanup callback when the mission/level ends.


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

Spawn Prefab (Flowgraph Node)

- **Node Name:** `Spawn Prefab`

Store Statics (Flowgraph Node)

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

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsBehaviorHow It WorksExample UsageKey DependenciesAdditional MethodsC:_executionStopped()C:destroy()C:init(mgr, ...)C:onClientEndMission()See Also