API ReferenceGE Extensionsgameplay
Gameplay Skidpad Test
Simple extension that runs an automated skidpad test - teleports a vehicle to a spawn point and has the AI drive a circular route.
Simple extension that runs an automated skidpad test - teleports a vehicle to a spawn point and has the AI drive a circular route.
Public API
| Function | Signature | Returns | Description |
|---|---|---|---|
startTest | (vehId) | nil | Start the skidpad test for a vehicle |
getData | () | table? | Get test results (nil until complete) |
cancelTest | () | nil | Request test cancellation |
M.cancelTest | () | - | cancelTest handler |
M.getData | () | - | Returns Data |
M.startTest | (vehId) | - | startTest handler |
How It Works
startTestbuilds a step sequence usingutil_stepHandler:- Step 1: Teleport vehicle to
skidpadSpawnscene object, reset results - Step 2: Wait 0.2 seconds for physics to settle
- Step 3: Command AI to drive through waypoints
skidpadWP1→WP2→WP3→WP4→WP1for 2 laps at full aggression
- Step 1: Teleport vehicle to
- Sequence is executed via
extensions.util_stepHandler.startStepSequence - Results are stored in
testResults(accessible viagetData())
AI Configuration
{
wpTargetList = {"skidpadWP1", "skidpadWP2", "skidpadWP3", "skidpadWP4", "skidpadWP1"},
noOfLaps = 2,
aggression = 1
}Usage
-- Start test on player vehicle
gameplay_skidpadTest.startTest(be:getPlayerVehicleID(0))
-- Poll for results
local results = gameplay_skidpadTest.getData()
if results then
-- Process test data
end
-- Cancel if needed
gameplay_skidpadTest.cancelTest()Dependencies
extensions.util_stepHandler- step sequence executionspawn-safeTeleportfor vehicle placement- Scene objects:
skidpadSpawn,skidpadWP1–skidpadWP4
Notes
- Requires scene objects named
skidpadSpawnandskidpadWP1–skidpadWP4 - The vehicle AI uses
ai.driveUsingPathwith the waypoint list cancelTestRequestedflag is set but not checked in the sequence (incomplete cancellation)- Test results population is not visible in this file - likely set by external callback
See Also
- Gameplay Achievement - Related reference
- Gameplay City - Related reference
- discover - Discover / Experience System - Related reference
- Gameplay Systems Guide - Guide
Gameplay Raw POIs
Extension that manages raw Point of Interest (POI) lists used by the bigmap/minimap. Aggregates POIs from all gameplay systems (missions, facilities, gas stations) with special handling for career tut
Speed Trap Leaderboards
Reference for `gameplay_speedTrapLeaderboards`, which manages per-level speed trap leaderboard storage. Tracks the top 10 fastest runs through each speed trap trigger in freeroam mode.