Skip to content

Display Dynamic Message

Display Dynamic Message

Displays a speech bubble that can optionally track and follow an entity on screen.

Properties

System

Name Explanation Type
Anchor The anchor direction for positioning the message bubble relative to the target entity. Direction
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 speech bubble. String
Constrain Message Area When enabled, the message bubble is constrained to a fixed screen area instead of following the target. Toggle
Constrained Area The fixed screen area to constrain the message bubble within. Rectangle
Dismissable When enabled, the player can dismiss the message by pressing the confirm key. Toggle
Duration The auto-dismiss duration in milliseconds. A value of 0 means the message will not auto-dismiss. Variable or Value
Header The header text displayed at the top of the speech bubble. 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
Padding The padding in pixels between the target's bounding box edge and the message bubble. Variable or Value
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
Target The actor the speech bubble is attached to and follows on screen. Actor Reference
Target When enabled, the speech bubble is attached to a specific actor on the map. Toggle
Use Portrait Expression When enabled, a portrait expression is applied to the hero's portrait. Toggle

Anchor

Name Explanation
None No anchor positioning.
Center Anchors to the center of the target.
Left Anchors to the left side of the target.
Top Anchors to the top of the target.
Right Anchors to the right side of the target.
Bottom Anchors to the bottom of the target.

Examples

Display a Speech Bubble on the Current Entity

This displays a speech bubble attached to the current entity (self) with default settings.

dynamic_message("Hello!", self);
{"Data":{"Anchor":3,"AudioMessage":{"DefaultValue":"","Values":[]},"Body":{"DefaultValue":"Hello!","Values":[]},"ConstrainedArea":{"X":0,"Y":0,"Width":0,"Height":0},"Duration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Header":{"DefaultValue":"","Values":[]},"HeroReference":{"Index":0,"IsInstanceIndex":true,"IsReferenceIndex":false},"IsBlockingInput":true,"IsCancelable":false,"IsDismissable":true,"IsMaintainingLastMessage":false,"OffsetX":0,"OffsetY":0,"Padding":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"10","VariableIndex":0,"Metadata":null},"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,"Target":{"EntityIndex":0,"IsEntity":false,"IsPartyMember":false,"IsSelf":true},"UseConstrainedArea":false,"UseHeroReference":false,"UsePortraitExpressionReference":false,"UseTarget":true,"UserInterfaceID":"00000000-0000-0000-0000-000000000000","Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Message.DynamicMessageCommand"}

Display a Timed Speech Bubble on an Entity

This displays a speech bubble on entity 0 that automatically dismisses after 3000 milliseconds and cannot be dismissed manually.

dynamic_message("Watch out!", entity(0), duration: 3000, dismissable: false);
{"Data":{"Anchor":3,"AudioMessage":{"DefaultValue":"","Values":[]},"Body":{"DefaultValue":"Watch out!","Values":[]},"ConstrainedArea":{"X":0,"Y":0,"Width":0,"Height":0},"Duration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"3000","VariableIndex":0,"Metadata":null},"Header":{"DefaultValue":"","Values":[]},"HeroReference":{"Index":0,"IsInstanceIndex":true,"IsReferenceIndex":false},"IsBlockingInput":true,"IsCancelable":false,"IsDismissable":false,"IsMaintainingLastMessage":false,"OffsetX":0,"OffsetY":0,"Padding":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"10","VariableIndex":0,"Metadata":null},"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,"Target":{"EntityIndex":0,"IsEntity":true,"IsPartyMember":false,"IsSelf":false},"UseConstrainedArea":false,"UseHeroReference":false,"UsePortraitExpressionReference":false,"UseTarget":true,"UserInterfaceID":"00000000-0000-0000-0000-000000000000","Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Message.DynamicMessageCommand"}

Display a Speech Bubble and Store Its Unique Identifier

This displays a speech bubble on a party member with a bottom anchor and stores the message unique ID in global variable 0.

$gv[0] = dynamic_message("Follow me!", party(0), anchor: bottom);
{"Data":{"Anchor":1,"AudioMessage":{"DefaultValue":"","Values":[]},"Body":{"DefaultValue":"Follow me!","Values":[]},"ConstrainedArea":{"X":0,"Y":0,"Width":0,"Height":0},"Duration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Header":{"DefaultValue":"","Values":[]},"HeroReference":{"Index":0,"IsInstanceIndex":true,"IsReferenceIndex":false},"IsBlockingInput":true,"IsCancelable":false,"IsDismissable":true,"IsMaintainingLastMessage":false,"OffsetX":0,"OffsetY":0,"Padding":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"10","VariableIndex":0,"Metadata":null},"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,"Target":{"EntityIndex":0,"IsEntity":false,"IsPartyMember":true,"IsSelf":false},"UseConstrainedArea":false,"UseHeroReference":false,"UsePortraitExpressionReference":false,"UseTarget":true,"UserInterfaceID":"00000000-0000-0000-0000-000000000000","Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Message.DynamicMessageCommand"}