API ReferenceGE ExtensionseditorraceEditor
Race Editor - Testing Tab
Sub-module for testing race paths with live race simulation, AI driving, and lap timing.
Sub-module for testing race paths with live race simulation, AI driving, and lap timing.
Overview
Opens a race test window that creates a live race instance from the current path. Supports manual driving, rolling starts, AI-driven tests (single or all vehicles), recovery, and displays lap times and event logs.
Class Methods
| Method | Signature | Description |
|---|---|---|
C:init | (raceEditor) | Initializes with parent editor reference |
C:setPath | (path) | Sets the race path for testing |
C:setupRace | () | Creates a new race instance with debug draw enabled |
C:startRace | (vehIds, enableAi, rollingStart) | Starts the race with specified options |
C:draw | (dt) | State machine: setup → race → stopped |
C:drawSetup | () | Renders lap count input, start buttons, AI test options |
C:drawRace | (dt) | Renders stop/state/recover buttons and timing; dt is delta time |
C:drawStopped | () | Renders restart button and final results |
C:drawTimes | () | Renders lap/split times (toggle detailed view) |
C:drawEventLog | () | Renders the race event log |
Test Modes
| Mode | Description |
|---|---|
| Start | Normal standing start with player vehicle |
| Start Rolling | Rolling start mode |
| AI Drive Test Current | AI drives the player vehicle |
| AI Drive Test All | AI drives all nearby vehicles |
| Move All to Start | Teleports all vehicles to starting positions |
Notes
- Deactivates the editor during race (
editor.setEditorActive(false)). - Race uses
gameplay/race/racemodule withuseDebugDraw = true. - AI vehicles are started with 0.8 aggression factor.
- "All Vehicles" test filters to vehicles within 100m of the default start position.
Module Variables
windowDescription(string) - Module variable.
Module Variables
windowDescription(string) - Module variable.
See Also
- Race Editor - Pacenotes Tab - Related reference
- Race Editor - Pathnodes Tab - Related reference
- Race Editor - Segments Tab - Related reference
- World Editor Guide - Guide