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 Disable

- **Node Name:** `AI Disable`

Overview

  • Node Name: AI Disable
  • Category: repeat_p_duration
  • File: extensions/flowgraph/nodes/vehicle/ai/disable.lua

Disables AI mode for a vehicle. Supports two methods: standard AI state disable or script stop with optional handbrake and wheel straightening.

Pin Schema

Input Pins

PinTypeDefaultDescription
aiVehIdnumber-Vehicle ID to disable AI for (uses player vehicle if empty)

Internals

Key Methods

MethodDescription
init()Sets up data fields for stop behavior
work()Sends the disable command to the vehicle each frame

Data Fields (auto-serialized)

FieldDefaultDescription
useScriptStopfalseUse ai:scriptStop() instead of ai.setState()
handBrakeWhenFinishedfalseApply handbrake when using script stop
straightenWheelsWhenFinishedfalseStraighten wheels when using script stop

Disable Methods

  • Standard (useScriptStop = false): ai.setState({mode = "disabled"}) - immediately sets AI to disabled.
  • Script Stop (useScriptStop = true): ai:scriptStop(handBrake, straightenWheels) - gracefully stops scripted AI driving.

How It Works

  1. Resolves the vehicle by aiVehId or defaults to the player vehicle.
  2. Based on useScriptStop, sends the appropriate disable command.
  3. Runs every frame (repeat_p_duration) to ensure the AI stays disabled.

Usage Example

-- Simple AI disable:
-- aiVehId = vehicleId
-- useScriptStop = false (default)
-- Sends: ai.setState({mode = "disabled"})

-- Graceful stop with handbrake:
-- aiVehId = vehicleId
-- useScriptStop = true
-- handBrakeWhenFinished = true
-- Sends: ai:scriptStop(true, false)

Key Dependencies

  • ai.setState() - standard AI state control
  • ai:scriptStop() - scripted AI stop with options

See Also

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

AI Directly To

- **Node Name:** `AI Directly To`

AI Flee

- **Node Name:** `AI Flee`

On this page

OverviewPin SchemaInput PinsInternalsKey MethodsData Fields (auto-serialized)Disable MethodsHow It WorksUsage ExampleKey DependenciesSee Also