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
And (Flowgraph Node)Boolean Expression (Flowgraph Node)Branch (Flowgraph Node)Bundle (Flowgraph Node)Chainflow Branch (Flowgraph Node)Compare (Flowgraph Node)Edge Detector (Flowgraph Node)Flow Switch (Flowgraph Node)Frame Delay (Flowgraph Node)Once (Flowgraph Node)Flow Interval / Rate Limit (Flowgraph Node)Select (Flowgraph Node)Sequencer (Flowgraph Node)Switch Case (Flowgraph Node)Timed Trigger (Flowgraph Node)Wait (Flowgraph Node)XOR (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 Extensionsflowgraphnodeslogic

Select (Flowgraph Node)

- **Node Name:** `Select`

Overview

  • Node Name: Select
  • Category: logic
  • File: extensions/flowgraph/nodes/logic/select.lua

Selects a value from multiple choices based on which selection flow pin is active. Supports merge functions for combining multiple active selections.

Pin Schema

Input Pins

PinTypeDescription
flowflowInflow for this node
select_1flowSelects value 1
value_1anyValue 1 that can be selected

Additional select_N/value_N pin pairs are created via the Count property.

Output Pins

PinTypeDescription
flowflowOutflow for this node
valueanyThe selected/merged value

Data Properties

PropertyTypeDefaultDescription
countnumber1Number of selectable value slots
modestring"first"Merge function when multiple selections are active

Behavior

  • init() - Sets count to 1 and mode to first.
  • work() - Iterates through all select pins. When flow is active and a select_N pin has flow, its corresponding value_N is passed to the merge function. If nothing is selected, output value is nil.
  • updatePins(old, new) - Dynamically adds or removes select/value pin pairs.
  • drawCustomProperties() - UI for adjusting count and selecting the merge function from fg_utils.sortedMergeFuns.any.

How It Works

The node provides a multiplexer pattern. Each slot has a flow trigger (select_N) and a data input (value_N). When a selection flow is active, the corresponding value feeds into the merge function. The merge function (from flowgraph/utils) determines how multiple simultaneous selections combine (first, last, sum, etc.).

If no flow pin is connected at the top, the last selected value persists.

Example Usage

-- Select between two camera modes:
-- select_1 = isFirstPerson flow, value_1 = "cockpit"
-- select_2 = isThirdPerson flow, value_2 = "chase"
-- Output value = whichever mode is active

-- With merge mode "first":
-- If both are active, the first matching value wins

Additional Methods

C:_executionStarted()

Called when graph execution starts. Used for initialization/reset.

C:_onDeserialized(res)

Called after the node is deserialized (loaded from file). Restores runtime state from saved data.

Parameters:

  • res

C:_onSerialize(res)

Called when the node is serialized (saved to file). Returns data to persist.

Parameters:

  • res

C:drawMiddle(builder, style)

Custom ImGui drawing in the middle section of the node in the editor.

Parameters:

  • builder
  • style

See Also

  • And (Flowgraph Node) - Related reference
  • Boolean Expression (Flowgraph Node) - Related reference
  • Branch (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Flow Interval / Rate Limit (Flowgraph Node)

- **Node Name:** `Flow Interval`

Sequencer (Flowgraph Node)

- **Node Name:** `Sequencer`

On this page

OverviewPin SchemaInput PinsOutput PinsData PropertiesBehaviorHow It WorksExample UsageAdditional MethodsC:_executionStarted()C:_onDeserialized(res)C:_onSerialize(res)C:drawMiddle(builder, style)See Also