Skip to content
ASArcaneMP Scripting APIScripting reference
Global objectClient APIGenerated

Races

const Races: object

Defined in: client/api.d.ts:5243

Broom-race track and session access (spike).

abandon(raceId?): object | null

Force-ends a stuck race and releases its gameplay locks.

string

object | null

active(): string | null

The active race’s id, if any.

string | null

clearBoosts(): number

Destroys every turbo bubble this session spawned.

number

clearGhosts(): number

Destroys stray pace-ghost riders left by earlier aborts.

number

fitBounds(raceId, points, padXY?, padZ?): boolean

Grows the race tile’s streaming bounds to cover a track, saving the authored box.

string

RacePoint[]

number

number

boolean

gates(): RacePoint[]

World positions of every spawned race gate.

RacePoint[]

getTrack(raceId): RacePoint[] | null

Reads a race’s current spline points.

string

RacePoint[] | null

hasBroom(): boolean | null

Whether the local player owns a broom; null if the inventory is unreadable.

boolean | null

hideHud(): boolean

Hides a stuck broom-race HUD (RaceHudDismissed does not do this).

boolean

info(raceId): RaceStatus | null

Race actor location, spline/gate counts and leash state.

string

RaceStatus | null

list(): RaceInfo[]

Lists loaded race actors.

RaceInfo[]

onBroom(raceId?): boolean | null

Whether the local player is currently mounted; null if unreadable.

string

boolean | null

restoreBounds(): number

Restores every tile bounds this session modified.

number

setLeash(raceId, enabled?): boolean

Toggles the off-track leash (bKeepPlayerCloseToSpline).

string

boolean

boolean

setTrack(raceId, points): boolean

Rewrites a race’s spline (>= 3 points).

string

RacePoint[]

boolean

spawnBoosts(raceId, fractions): number

Spawns turbo bubbles at 0..1 fractions along the spline; returns the count.

string

number[]

number

start(raceId): boolean

Starts a race as a non-mission run.

string

boolean

timer(raceId?): RaceTimer | null

The race’s clock as its HUD shows it; the active race without an id. It holds after the race ends, until it starts again.

string

RaceTimer | null

watchEvents(): boolean

Arms ProcessEvent watches for OnRaceStart / OnRaceFinish / OnRaceAbandoned, delivered as ‘gameEvent’.

boolean