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

XOR (Flowgraph Node)

- **Node Name:** `Xor`

Overview

  • Node Name: Xor
  • Category: logic
  • File: extensions/flowgraph/nodes/logic/xor.lua

Outputs flow only when exactly one of the two input pins has flow. A simple exclusive-or gate for flow signals.

Pin Schema

Input Pins

PinTypeDescription
aflowFirst flow input
bflowSecond flow input

Output Pins

PinTypeDescription
flowflowOutflow - active when exactly one input has flow

Behavior

  • work() - Sets output to a ~= b. If both are true or both are false, output is false.

How It Works

The node uses Lua's inequality operator (~=) on the two flow pin values. Since flow values are truthy/falsy, this effectively implements XOR: output is true only when exactly one input has flow.

Example Usage

-- Detect when only one of two conditions is met:
-- a = player is in vehicle
-- b = player is in building
-- flow = true only if in one but not both (or neither)

-- Truth table:
-- a=false, b=false → flow=false
-- a=true,  b=false → flow=true
-- a=false, b=true  → flow=true
-- a=true,  b=true  → flow=false

See Also

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

Wait (Flowgraph Node)

- **Node Name:** `Wait`

Foreach (Flowgraph Node)

- **Node Name:** `Foreach`

On this page

OverviewPin SchemaInput PinsOutput PinsBehaviorHow It WorksExample UsageSee Also