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
State Entry (Flowgraph State Node)State Exit (Flowgraph State Node)State Node (Flowgraph Node)Transition (Flowgraph Node)Get Transition Variables (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 Extensionsflowgraphnodesstates

State Exit (Flowgraph State Node)

- **Node Name:** `State Exit`

Overview

  • Node Name: State Exit
  • Type: State node (created via _flowgraph_createStateNode)
  • File: extensions/flowgraph/nodes/states/stateExit.lua

Exit point for a stategraph. When reached, triggers a named transition to leave the current state.

Pin Schema

Input Pins

PinTypeDescription
flowstateState flow input - receives flow from the graph

Additional pins: Supports manually added state type pins via allowedManualPinTypes.

Node Properties

PropertyValueDescription
hiddentrueNot visible in the node palette
icon"trending_up"Upward arrow icon
colorred (1, 0.4, 0.4, 1)Red tint to indicate exit

Internals

FieldPurpose
self.transitionNameName of the transition triggered on exit
self.savePinsWhether custom pins are serialized

Behavior

  • drawMiddle() - Displays the transition name in the node UI.
  • drawCustomProperties() - Provides a combo box to select from available transition names defined on the parent state node.
  • Serialization - transitionName is saved/restored with the graph.

How It Works

  1. A stategraph can have multiple State Exit nodes, each with a different transitionName.
  2. When execution reaches this node, the named transition fires on the parent state machine.
  3. The transition name is selected from the parent node's getTransitionNames() list via the editor UI.
  4. The parent stategraph node uses the transition name to determine which state to enter next.

Key Dependencies

  • _flowgraph_createStateNode(C) - state node factory
  • Parent state node's getTransitionNames() - provides available transition options

Additional Methods

C:_onDeserialized(data)

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

Parameters:

  • data

C:_onSerialize(res)

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

Parameters:

  • res

C:init(mgr)

Initializes the node, setting up pins and default properties.

Parameters:

  • mgr

See Also

  • State Entry (Flowgraph State Node) - Related reference
  • State Node (Flowgraph Node) - Related reference
  • Transition (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

State Entry (Flowgraph State Node)

- **Node Name:** `State Entry`

State Node (Flowgraph Node)

- **Node Name:** `State Node`

On this page

OverviewPin SchemaInput PinsNode PropertiesInternalsBehaviorHow It WorksKey DependenciesAdditional MethodsC:_onDeserialized(data)C:_onSerialize(res)C:init(mgr)See Also