Talos docs

StartCountdownOptions

Since 0.7

The start countdown's settings.

Plain text

Every one is optional.

Signature

export interface StartCountdownOptions {
  /** The `StartCountdown` node's id. Default `countdown`. */
  id?: string
  /** The first figure. Default 3. */
  from?: number
  /** Seconds each figure shows. Default 1. */
  step?: number
  /** Seconds GO! shows before the countdown hides. Default 0.8. */
  goFor?: number
  /** GO!'s string key. Default `ui.race.startGo`. */
  goKey?: string
  /** The event raised once, at GO!. Default `race-go`: a game event name, not an engine one. */
  event?: string
  /**
   * An input context to hold the scene in from `start()` until GO!, then hand back the one it was in.
   * Declare it in the scene's `meta.input.contexts` with no driving actions (`"countdown": {}`), and an
   * `input: "auto"` vehicle sits still through the count. Absent, nothing is held; a name the scene does
   * not declare holds nothing either (`ctx.input.setContext` answers false), and nor does a behaviour
   * with no `ctx.input`: run the countdown from the player's vehicle or the player spawn, not a prop.
   */
  hold?: string
}

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

Members

MemberSignatureDescription
idid?: stringThe StartCountdown node's id. Default countdown.
fromfrom?: numberThe first figure. Default 3.
stepstep?: numberSeconds each figure shows. Default 1.
goForgoFor?: numberSeconds GO! shows before the countdown hides. Default 0.8.
goKeygoKey?: stringGO!'s string key. Default ui.race.startGo.
eventevent?: stringThe event raised once, at GO!. Default race-go: a game event name, not an engine one.
holdhold?: stringAn input context to hold the scene in from start() until GO!, then hand back the one it was in. Declare it in the scene's meta.input.contexts with no driving actions ("countdown": {}), and an input: "auto" vehicle sits still through the count. Absent, nothing is held; a name the scene does not declare holds nothing either (ctx.input.setContext answers false), and nor does a behaviour with no ctx.input: run the countdown from the player's vehicle or the player spawn, not a prop.