Skip to content

LSDE Dialog Engine / ActionBlock

Interface: ActionBlock

Defined in: types.ts:409

Action block — triggers game state changes.

Remarks

The developer MUST handle execution in the onAction handler.

The block has two output ports: "then" (success) and "catch" (failure). Call context.resolve() for success or context.reject(error) for failure. If no "catch" connection exists, rejection falls back to the "then" port.

Example

ts
engine.onAction(({ block, context, next }) => {
  try {
    for (const action of block.actions ?? []) {
      executeGameAction(action);
    }
    context.resolve();   // → "then" port
  } catch (err) {
    context.reject(err); // → "catch" port (fallback "then")
  }
  next();
});

See

Extends

Properties

actions?

optional actions?: ExportAction[]

Defined in: types.ts:412

Actions to execute. Each references an ActionSignature via actionId.


isStartBlock?

optional isStartBlock?: boolean

Defined in: types.ts:260

When true, this block is the entry point of the scene. Only one per scene.

Inherited from

BlueprintBlockBase.isStartBlock


label?

optional label?: string

Defined in: types.ts:248

Display label assigned in the editor.

Inherited from

BlueprintBlockBase.label


metadata?

optional metadata?: BlockMetadata

Defined in: types.ts:258

Non-logic metadata for display and organization.

Inherited from

BlueprintBlockBase.metadata


nativeProperties?

optional nativeProperties?: NativeProperties

Defined in: types.ts:256

LSDE native execution properties (async, delay, portPerCharacter, etc.).

Inherited from

BlueprintBlockBase.nativeProperties


note?

optional note?: string

Defined in: types.ts:414

Designer note. Not displayed to players.


parentLabels?

optional parentLabels?: string[]

Defined in: types.ts:250

Hierarchy of parent folder labels providing structural context.

Inherited from

BlueprintBlockBase.parentLabels


properties

properties: BlockProperty[]

Defined in: types.ts:252

Custom key-value properties defined by block configuration.

Inherited from

BlueprintBlockBase.properties


type

type: "ACTION"

Defined in: types.ts:410

Block type determining behavior and rendering.

Overrides

BlueprintBlockBase.type


userProperties?

optional userProperties?: Record<string, string | number | boolean>

Defined in: types.ts:254

User-defined custom properties dictionary set by the narrative designer.

Inherited from

BlueprintBlockBase.userProperties


uuid

uuid: string

Defined in: types.ts:244

Unique block identifier.

Inherited from

BlueprintBlockBase.uuid