Skip to content

Display Static Message

Display Static Message

Displays a message box on screen with an optional portrait, header, audio, and customizable template.

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
Body The main message text to display in the message box. String
Header The header text displayed at the top of the message box. String
Hero Portrait The hero whose portrait image is displayed alongside the message. Character
Hero Portrait When enabled, the portrait is sourced from a hero reference. When disabled, a custom portrait image is used. Toggle
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
Portrait A custom portrait image displayed alongside the message. Sprite or Model
Portrait Expression The portrait expression to apply to the hero's portrait image. Portrait Expression
Result The variable to store the unique ID of the displayed message into. Variable or Value
Store Message ID When enabled, the unique ID of the displayed message is stored in a variable for later reference. Toggle
Use Portrait Expression When enabled, a portrait expression is applied to the hero's portrait. Toggle

Examples

Display a Simple Static Message

This displays a basic message box with the specified text.

static_message("Hello world");
{"Data":{"AudioMessage":{"DefaultValue":"","Values":[]},"Body":{"DefaultValue":"Hello world","Values":[]},"Header":{"DefaultValue":"","Values":[]},"HeroReference":{"Index":0,"IsInstanceIndex":true,"IsReferenceIndex":false},"IsCancelable":false,"IsBlockingInput":true,"IsMaintainingLastMessage":false,"OffsetX":0,"OffsetY":0,"Portrait":{"Name":"","SpriteFrames":0,"SpriteOrientation":0},"PortraitExpressionReference":{"Index":0,"IsInstanceIndex":false,"IsReferenceIndex":true},"Result":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"StoreID":false,"UseHeroReference":false,"UsePortraitExpressionReference":false,"UserInterfaceID":"00000000-0000-0000-0000-000000000000","Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Message.StaticMessageCommand"}

Display a Message with Header and Hero Portrait

This displays a message box with a header, using the first hero in the party as the portrait.

static_message("Welcome to the castle.", header: "Guard", hero: hero(0));
{"Data":{"AudioMessage":{"DefaultValue":"","Values":[]},"Body":{"DefaultValue":"Welcome to the castle.","Values":[]},"Header":{"DefaultValue":"Guard","Values":[]},"HeroReference":{"Index":0,"IsInstanceIndex":true,"IsReferenceIndex":false},"IsCancelable":false,"IsBlockingInput":true,"IsMaintainingLastMessage":false,"OffsetX":0,"OffsetY":0,"Portrait":{"Name":"","SpriteFrames":0,"SpriteOrientation":0},"PortraitExpressionReference":{"Index":0,"IsInstanceIndex":false,"IsReferenceIndex":true},"Result":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"StoreID":false,"UseHeroReference":true,"UsePortraitExpressionReference":false,"UserInterfaceID":"00000000-0000-0000-0000-000000000000","Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Message.StaticMessageCommand"}

Display a Message and Store Its Unique Identifier

This displays a message with input enabled and stores the resulting unique ID in global variable 0 for later dismissal.

$gv[0] = static_message("Press any key to continue.", enable_input);
{"Data":{"AudioMessage":{"DefaultValue":"","Values":[]},"Body":{"DefaultValue":"Press any key to continue.","Values":[]},"Header":{"DefaultValue":"","Values":[]},"HeroReference":{"Index":0,"IsInstanceIndex":true,"IsReferenceIndex":false},"IsCancelable":false,"IsBlockingInput":false,"IsMaintainingLastMessage":false,"OffsetX":0,"OffsetY":0,"Portrait":{"Name":"","SpriteFrames":0,"SpriteOrientation":0},"PortraitExpressionReference":{"Index":0,"IsInstanceIndex":false,"IsReferenceIndex":true},"Result":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"StoreID":true,"UseHeroReference":false,"UsePortraitExpressionReference":false,"UserInterfaceID":"00000000-0000-0000-0000-000000000000","Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Message.StaticMessageCommand"}