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
Route Distance (Flowgraph Node)Closest Road (Flowgraph Node)Custom Lua (Flowgraph Node)Distance Between (Flowgraph Node)Waypoints Distance (Flowgraph Node)File Exists (Flowgraph Node)Get First Element of Table (Flowgraph Node)Get Level Data (Flowgraph Node)Get Map Objects IDs by DynField (Flowgraph Node)Get Table Value By Key (Flowgraph Node)GHOST (Flowgraph Node)Hide Loading Screen (Flowgraph Node)Color HSV (Flowgraph Node)Line Point From Xnorm (Flowgraph Node)Load Level (Flowgraph Node)Load Project (Flowgraph Node)On Menu (Flowgraph Node)Perlin Noise (Flowgraph Node)Pop Action Map (Flowgraph Node)Get Project InfoPush Action MapRandom ColorRandom NumberRandom QuaternionRandom VectorRoad PropertiesGet Navgraph RouteRoute PositionTemplate NodeTimeTimed SequenceTo NumberTo StringWorld Editor Open

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 Extensionsflowgraphnodesutil

Get First Element of Table (Flowgraph Node)

- **Node Name:** `Get First Element of Table`

Overview

  • Node Name: Get First Element of Table
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/util/firstElement.lua

Extracts the first element (index 1) from an input table.

Pin Schema

Input Pins

PinTypeDescription
tabletableThe table to get the first element of

Output Pins

PinTypeDescription
firstElementanyThe first element of the table

Internals

Key Methods

MethodDescription
init(mgr)Empty initializer
_executionStarted()Resets oldPos to nil
getFirstElement(table)Returns self.pinIn.table.value[1]
work()Outputs first element every frame if table is present

How It Works

  1. Checks if the table input has a value.
  2. Returns table[1] - the first element using Lua's 1-based indexing.
  3. Runs every frame (repeat_instant category).

Usage Example

-- Get the first waypoint from a list:
-- [Get Waypoints] → table → [Get First Element] → firstElement → [Use Position]

-- Get the first vehicle ID from a filtered list:
-- [Get Vehicle IDs] → table → [Get First Element] → firstElement → [Focus Camera]

Key Dependencies

None - pure table indexing utility.


See Also

  • Route Distance (Flowgraph Node) - Related reference
  • Closest Road (Flowgraph Node) - Related reference
  • Custom Lua (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

File Exists (Flowgraph Node)

- **Node Name:** `File Exists`

Get Level Data (Flowgraph Node)

- **Node Name:** `Get Level Data`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also