Skip to content

SequenceDef beta ​

Interface of @v12-engine/engine

ts
export interface SequenceDef<D = any>

What a mission or a cutscene is mostly made of: do this, wait two seconds, then that, then wait until the gate holds five invaders. Made with defineSequence and given in Rules.sequences, so that a save finds the steps by id: what is kept in the world of a running sequence is which one, which step, and its data, never a function. That is why it is not an async function: one of those cannot be saved halfway through

Members ​

id ​

ts
readonly id: string;

Shared by every game, like other ids: give it a prefix of the game's ('td.briefing')

steps ​

ts
readonly steps: readonly Step<D>[];

The steps in order: functions, waits and wait-fors, run one after the other