Skip to content

Display Dialogue Options

Display Dialogue Options

Displays a dialogue box with multiple options for the player to choose from, each with its own set of commands to execute.

Properties

System

Name Explanation Type
Audio The audio clip to play when the message is displayed. Sound Effect
Block Input When enabled, player input is blocked while the message is displayed. Toggle
Canceled Commands The commands to execute when the player cancels the dialogue. Script
Dialogue Template The user interface template used to render the dialogue options. User Interface
Is Cancelable When enabled, the player can cancel the message or dialogue. Toggle
Maintain Last Message Displayed When enabled, the previous message remains visible while the dialogue is displayed. Toggle
Message Template The user interface template used to render the message box. User Interface
Offset The pixel offset applied to the message box position. Point
Options The list of dialogue options the player can choose from. Array

Examples

Display a Simple Dialogue with Two Choices

This displays a dialogue box with two options, each executing different commands when selected.

dialogue_options() {
    case ("Accept") {
    }
    case ("Decline") {
    }
}
{"Data":{"AudioMessage":{"DefaultValue":"","Values":[]},"CanceledCommands":[],"IsBlockingInput":true,"IsCancelable":false,"IsMaintainingLastMessage":false,"OffsetX":0,"OffsetY":0,"Options":[{"Commands":[],"Conditions":[],"Name":{"DefaultValue":"Accept","Values":[]}},{"Commands":[],"Conditions":[],"Name":{"DefaultValue":"Decline","Values":[]}}],"UserInterfaceID":"00000000-0000-0000-0000-000000000000","Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Message.DialogueOptionsCommand"}

Display Dialogue Options with a Cancel Handler

This displays a dialogue with a conditional option and a default cancel handler that runs when the player presses cancel.

dialogue_options(maintain_last_message) {
    case ("Yes") {
    }
    case ("No") {
    }
    default {
    }
}
{"Data":{"AudioMessage":{"DefaultValue":"","Values":[]},"CanceledCommands":[],"IsBlockingInput":true,"IsCancelable":true,"IsMaintainingLastMessage":true,"OffsetX":0,"OffsetY":0,"Options":[{"Commands":[],"Conditions":[],"Name":{"DefaultValue":"Yes","Values":[]}},{"Commands":[],"Conditions":[],"Name":{"DefaultValue":"No","Values":[]}}],"UserInterfaceID":"00000000-0000-0000-0000-000000000000","Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Message.DialogueOptionsCommand"}