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

Set Object Field (Flowgraph Node)

- **Node Name:** `Set Object Field`

Overview

  • Node Name: Set Object Field
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/scene/setObjectField.lua

Sets a field on any scene object by ID. Supports both static fields and dynamic data fields.

Pin Schema

Input Pins

PinTypeDescription
objectIdnumberID of the object to modify
fieldNamestringName of the field to set
fieldArrayNumnumber(Hidden) Array index for the field (default 0)
valueanyValue to set. Tables/vectors are auto-converted to space-separated strings

Output Pins

PinTypeDescription
objectFoundbool(Hidden) True when the object was found

Behavior

  • work() - Each frame:
    1. Finds the object via scenetree.findObjectById(objectId).
    2. If the value is a table, joins it with spaces (e.g., {1, 0, 0} → "1 0 0").
    3. Checks if the field exists in obj:getFields() - if so, uses setField().
    4. Otherwise falls back to setDynDataFieldbyName() for dynamic fields.
    5. Calls updateInstanceRenderData() if available to refresh visuals.

How It Works

  1. Looks up the target object in the scene tree.
  2. Automatically handles type conversion for vectors, quaternions, and colors passed as tables.
  3. Distinguishes between built-in fields and dynamic data fields to use the correct setter.
  4. Triggers a render data update so visual changes (like instance colors) take effect immediately.

Example Usage

-- Change the instance color of a TSStatic:
-- objectId = <some_id>
-- fieldName = "instanceColor"
-- value = {1, 0, 0, 1}  -- red

Key Dependencies

  • scenetree.findObjectById() - scene object lookup
  • obj:setField() / obj:setDynDataFieldbyName() - field setters
  • obj:updateInstanceRenderData() - visual refresh

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

Reset Prefab (Flowgraph Node)

- **Node Name:** `Reset Prefab`

Sevensegment Display (Flowgraph Node)

- **Node Name:** `Sevensegment Display`

On this page

OverviewPin SchemaInput PinsOutput PinsBehaviorHow It WorksExample UsageKey DependenciesSee Also