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
Align For CouplingApply Velocity to VehicleBoost VehicleSet Vehicle ColorsCustom Parts Config ProviderEnter VehicleFlip UprightFreeze VehicleGenerate License PlateGet Vehicle ActiveGet Electrics ValueGet GearboxmodeGet Powertrain DataGravity ForceDistance From GroundHas Coupler TagIs CoupledIs Player UsableKeep VehicleMove Vehicle ToOn Cannon FiredOn Vehicle DestroyedOn Vehicle ResetOn Vehicle SpawnedOn Vehicle SwitchedPlayer UsableRandom Config ProviderRecover In PlaceRemove VehicleTimeline ReplaySet Vehicle ActiveSet Gearbox ModeSet IgnitionSet License PlateSet LightbarSet LightsShift to Gear IndexSpawn VehicleVehicle StatesTeleport To Last RoadToggle Vehicle ControlsMove To ShowroomVehicle TouchProps TouchStatic Object TouchTrack VehicleTrailer Respawn ControlVehicle Config ProviderGet Vehicle DataGet Vehicle DataGet Vehicle BoundsVehicle PingGet Vehicle Wheel Center
AI ParametersAI ArriveAI ChaseAI Directly ToAI DisableAI FleeAI FollowAI Follow WaypointsGet AI ModeAI Go To The End LineAI RandomFollow DecalroadAI StopAI Traffic

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 Extensionsflowgraphnodesvehicleai

AI Stop

- **Node Name:** `AI Stop`

Overview

  • Node Name: AI Stop
  • Category: once_p_duration
  • File: extensions/flowgraph/nodes/vehicle/ai/stop.lua

Commands the AI to stop a vehicle. Provides a stopped flow output that fires once the vehicle's velocity drops below a threshold.

Pin Schema

Input Pins

PinTypeDefaultDescription
aiVehIdnumber-Vehicle ID to stop. Uses player vehicle if empty.
checkVelocitynumber0.01Velocity threshold to consider the vehicle stopped (hidden, hardcoded).

Output Pins

PinTypeDescription
stoppedflowFires once the vehicle velocity is below checkVelocity.

Internals

Key Methods

MethodDescription
workOnce()Sends ai.setState({mode = "stop"}) to the vehicle.
work()Checks map.objects[vehId].vel:length() against threshold; sets complete when below.
onNodeReset()Resets complete flag.
_executionStarted()Calls onNodeReset().

How It Works

  1. workOnce() fires once and sends ai.setState({mode = "stop"}) - the AI begins braking.
  2. Each frame, work() reads the vehicle velocity from map.objects.
  3. When velocity magnitude drops below checkVelocity (default 0.01 m/s), sets complete = true.
  4. On subsequent frames, outputs stopped = true.

Usage Example

-- Flowgraph:
-- [Some Event] → [AI Stop (aiVehId=myVeh)] → stopped → [Vehicle Is Parked]

-- Equivalent vehicle command:
ai.setState({mode = "stop"})
-- Then check: map.objects[vehId].vel:length() < 0.01

Key Dependencies

  • ai.setState({mode = "stop"}) - vehicle-side AI stop command
  • map.objects[id].vel - velocity data from the map module

See Also

  • AI Parameters (Flowgraph Node) - Related reference
  • AI Arrive (Flowgraph Node) - Related reference
  • AI Chase (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Follow Decalroad

- **Node Name:** `Follow Decalroad`

AI Traffic

- **Node Name:** `AI Traffic`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also