StartCountdownTimerEventSchema

@Serializable
@SerialName(value = "StartCountdownTimer")
data class StartCountdownTimerEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val timerData: StartCountdownTimerEventSchema.TimerData) : EventSchema

Starts a countdown in a coroutine launched from the running event's context, ticking down from TimerData initial to its step in step-sized decrements, waiting one step between ticks. TimerData chooses the unit: Milliseconds or Seconds.

The event returns as soon as the countdown is launched, so the chain continues while the timer keeps running in the background. It stops on its own when the countdown ends; to stop it early, launch it from inside a RunCancellableEvents and cancel that id with CancelEvents.

incomingData consumed: not used.

Triggers fired:

  • OnCountdownTimerTickEventTrigger — once per tick, with the remaining amount passed as incomingData.

  • OnTimeFinishEventTrigger — once, after the last tick. No data is passed downstream.

Neither success nor failure is reported.

Constructors

Types

Link copied to clipboard
@Serializable
sealed interface TimerData

Properties

Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?

This event's own children — each declaring, via its own trigger, which of this event's outgoing triggers runs it. null when this event declares no children.

Link copied to clipboard
@SerialName(value = "id")
open override val id: String

Unique identifier — how TriggerEvent/UpdateEvents address this event by id. Defaults to a random id when omitted from the DSL.

Link copied to clipboard
@SerialName(value = "timerData")
val timerData: StartCountdownTimerEventSchema.TimerData
Link copied to clipboard
@SerialName(value = "trigger")
open override val trigger: EventTrigger

The condition that must occur for this event to run — matched by structural equality (data class/data object equality) against whatever trigger value fired, never by any kind of subscription or listener registry.