Talos docs

RoadDriverState

Since 0.7

What the road-driver behaviour keeps in ctx.state between ticks (read it, do not set it).

Plain text

Signature

export interface RoadDriverState {
  /** Metres along the road. */
  s?: number
  /** Laps completed, from `road.progress` (0 on an open road). */
  lap?: number
  /** Place in the race on this road, 1 first, from `road.progress`. */
  place?: number
  /** Metres past the start line, laps included (`road.progress`'s `distance`). */
  distance?: number
  /** More than 10 m backwards along the road (`road.progress`'s `wrongWay`). */
  wrongWay?: boolean
  /** +1 driving along the road, -1 against it. */
  way?: number
  /** The speed it is driving for now, m/s. */
  targetSpeed?: number
  /** Reversing out of a wedge this tick. */
  backingOut?: boolean
  /** Back-outs in all. */
  backOuts?: number
  /** Three back-outs in a row have failed; cleared when it gets going again. */
  stuck?: boolean
  /** {@link stepWedge}'s memory. */
  wedge?: WedgeState
  /** At the end of an open road, stopped there. */
  finished?: boolean
  /** The last steer it drove with. */
  steer?: number
  /** It has said why it cannot drive. */
  warned?: boolean
  /** Held still: before `startOn`, or after `stopOn`. */
  held?: boolean
  /** Seconds left of turning the wheels to the aim before pulling away after a restart. */
  pullAway?: number
}

Import: import type { RoadDriverState } from "@argus/gameplay"

Members

MemberSignatureDescription
ss?: numberMetres along the road.
laplap?: numberLaps completed, from road.progress (0 on an open road).
placeplace?: numberPlace in the race on this road, 1 first, from road.progress.
distancedistance?: numberMetres past the start line, laps included (road.progress's distance).
wrongWaywrongWay?: booleanMore than 10 m backwards along the road (road.progress's wrongWay).
wayway?: number+1 driving along the road, -1 against it.
targetSpeedtargetSpeed?: numberThe speed it is driving for now, m/s.
backingOutbackingOut?: booleanReversing out of a wedge this tick.
backOutsbackOuts?: numberBack-outs in all.
stuckstuck?: booleanThree back-outs in a row have failed; cleared when it gets going again.
wedgewedge?: WedgeState{@link stepWedge}'s memory.
finishedfinished?: booleanAt the end of an open road, stopped there.
steersteer?: numberThe last steer it drove with.
warnedwarned?: booleanIt has said why it cannot drive.
heldheld?: booleanHeld still: before startOn, or after stopOn.
pullAwaypullAway?: numberSeconds left of turning the wheels to the aim before pulling away after a restart.