Skip to content

LSDE Dialog Engine / SceneEndReason

Variable: SceneEndReason ​

const SceneEndReason: object

Defined in: types.ts:416

Why a scene ended — what onSceneExit is told in SceneContext.reason.

faulted and deadlocked are the two a game most needs to tell apart from completed. A waitForBlocks wired to a block no track will ever finish used to end exactly like a scene played to its last line, and a game awaiting the exit of a dialogue could not know it had been cut short.

Type Declaration ​

Cancelled ​

readonly Cancelled: "cancelled" = 'cancelled'

handle.cancel() or engine.stop().

Completed ​

readonly Completed: "completed" = 'completed'

The flow ran out of graph.

Deadlocked ​

readonly Deadlocked: "deadlocked" = 'deadlocked'

Every track left is parked on a waitForBlocks nothing can finish any more. See waitingFor.

Faulted ​

readonly Faulted: "faulted" = 'faulted'

Code of the game threw during the walk — a handler, a cleanup, a resolver, a hook. The scene is closed first, then the error reaches whoever called start(), next() or resolve().

Invalidated ​

readonly Invalidated: "invalidated" = 'invalidated'

onValidateNextBlock refused the block the last running track was entering.