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
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
- ExportAction for action structure
- ActionSignature for reusable action type definitions
- ActionContext for handler context
Extends
Properties
actions?
optionalactions?:ExportAction[]
Defined in: types.ts:412
Actions to execute. Each references an ActionSignature via actionId.
isStartBlock?
optionalisStartBlock?: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?
optionallabel?:string
Defined in: types.ts:248
Display label assigned in the editor.
Inherited from
metadata?
optionalmetadata?:BlockMetadata
Defined in: types.ts:258
Non-logic metadata for display and organization.
Inherited from
nativeProperties?
optionalnativeProperties?:NativeProperties
Defined in: types.ts:256
LSDE native execution properties (async, delay, portPerCharacter, etc.).
Inherited from
BlueprintBlockBase.nativeProperties
note?
optionalnote?:string
Defined in: types.ts:414
Designer note. Not displayed to players.
parentLabels?
optionalparentLabels?: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
type
type:
"ACTION"
Defined in: types.ts:410
Block type determining behavior and rendering.
Overrides
userProperties?
optionaluserProperties?: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.
