RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Drag Race DebugDrag Tree DisplayDrag Race APIDrag Racing ManagerDrag Strip Save SystemDrag Race TimingDrag Race Phases
Bracket Drag RaceDrag Practice RaceHeads-Up Drag Race

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 ExtensionsgameplaydragdragTypes

Drag Practice Race

Reference for `gameplay_drag_dragTypes_dragPracticeRace`, which implements a single-player practice drag race with automatic cleanup.

Reference for gameplay_drag_dragTypes_dragPracticeRace, which implements a single-player practice drag race with automatic cleanup.


Overview

Practice races are the simplest drag type - a single racer runs the strip alone with no dial handicap. If the racer is disqualified, the race auto-resets after 3 seconds. In freeroam context, drag data is cleared after completion. This is the default drag type for freeroam POI-triggered races.


Dependencies

gameplay_drag_general, gameplay_drag_utils


Exports

| Function | Signature | Description | |------ | M.dependencies | table | {"gameplay_drag_general", "gameplay_drag_utils"} |----|-----------|-------------| | onExtensionLoaded | () | Caches module references, clears state | | onUpdate | (dtReal, dtSim, dtRaw) | Main loop - runs phases, handles DQ/finish | | startActivity | () | Begin the race with dial = 0 for all racers | | resetDragRace | () | Reset race state and refresh dragData | | jumpDescualifiedDrag | () | Empty stub (unused) |


Internals

SymbolPurpose
hasActivityStartedGate for update loop
dqTimerSeconds since disqualification; resets at 3 s
clearDelayTimer1 s delay before clearing data after finish
shouldClearAfterFinishFlag to trigger delayed clear

How It Works

-- Practice race starts with zero dial for all racers
gameplay_drag_dragTypes_dragPracticeRace.startActivity()
-- internally: dials = {{vehId = racer.vehId, dial = 0}, ...}

-- onUpdate flow per frame:
-- 1. If shouldClearAfterFinish, wait 1s then clearDragData()
-- 2. For each racer:
--    a. If finished → mark completed, reset, optionally clear (freeroam)
--    b. updateRacer → run phase → advance if complete
--    c. Check boundary → reset if out of bounds
-- 3. If any racer disqualified → 3s timer → reset + clear

Key Behaviors

  • No dependency-based phase synchronisation (each racer advances independently)
  • Disqualification triggers a 3-second countdown before auto-reset
  • In freeroam context, a 1-second delay occurs after finish before full data clear
  • Boundary checking calls dUtils.isRacerInsideBoundary(racer) every frame; violation causes immediate reset
  • The single-racer finish immediately marks dragData.isCompleted = true

Module Variables

VariableTypeDescription
M.dependenciestable{"gameplay_drag_general", "gameplay_drag_utils"}
M.jumpDescualifiedDrag()-
M.onExtensionLoaded()-
M.onUpdate(dtReal, dtSim, dtRaw)-
M.resetDragRace()-
M.startActivity()-

See Also

  • drag/dragTypes/bracketRace - Bracket Race Type - Related reference
  • drag/dragTypes/headsUpDrag - Heads-Up Drag Race - Related reference
  • Gameplay Systems Guide - Guide

Bracket Drag Race

Reference for `gameplay_drag_dragTypes_bracketRace`, which implements the bracket-style drag race where racers have a dial-in time and staggered starts.

Heads-Up Drag Race

Reference for `gameplay_drag_dragTypes_headsUpDrag`, which implements a two-racer heads-up drag race with no handicap.

On this page

OverviewDependenciesExportsInternalsHow It WorksKey BehaviorsModule VariablesSee Also