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

And (Flowgraph Node)

- **Node Name:** `And`

Overview

  • Node Name: And
  • Category: logic
  • File: extensions/flowgraph/nodes/logic/and.lua
  • Icon: fg_gate_icon_and

Only lets flow through if all input pins receive flow. Supports a configurable number of inputs.

Pin Schema

Input Pins (default 2, configurable)

PinTypeDescription
flow_1flowFirst flow input
flow_2flowSecond flow input
flow_NflowNth flow input (added via properties)

Output Pins

PinTypeDescription
flowflowOutflow - active only when all inputs receive flow

Legacy Pin Names

  • a → flow_1
  • b → flow_2

Internals

  • self.count - number of input flow pins (default 2, configurable via editor UI).
  • drawCustomProperties() provides an integer input to add/remove flow pins dynamically.
  • updatePins(old, new) - adds or removes pins. When removing, also deletes connected links.
  • Serializes/deserializes the count value.
  • On deserialization, calls updatePins(2, count) to restore extra pins beyond the default 2.

How It Works

  1. Each frame, iterates over all flow_1 through flow_N input pins.
  2. If any pin is false/nil, outputs flow = false and returns early.
  3. Only if all pins are truthy does it output flow = true.

Lua Code Example

-- Logical AND in a flowgraph context:
-- Connect multiple flow sources to flow_1, flow_2, flow_3...
-- Output flow only activates when ALL inputs are active.

-- Equivalent logic:
local allActive = true
for i = 1, count do
  if not flowInputs[i] then
    allActive = false
    break
  end
end

Key Dependencies

  • None - pure logic node with no external dependencies

Additional Methods

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:init()

Initializes the node, setting up pins and default properties.

C:work()

Main work function called each frame/tick when the node is active.


See Also

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

Get Action Control (Flowgraph Node)

- **Node Name:** `Get action control`

Boolean Expression (Flowgraph Node)

- **Node Name:** `Boolean Expression`

On this page

OverviewPin SchemaInput Pins (default 2, configurable)Output PinsLegacy Pin NamesInternalsHow It WorksLua Code ExampleKey DependenciesAdditional MethodsC:_onDeserialized(res)C:_onSerialize(res)C:init()C:work()See Also