Skip to content

Add Annotations

Add Annotations

Attaches one or more visual annotations to a target actor.

Properties

System

Name Explanation Type
Annotations The list of annotations to add to the target actor. Annotation
Target The actor to add annotations to. Actor Reference

Examples

Add a Sprite Annotation to an Entity

Attaches a sprite annotation using a custom image to entity 0.

add_annotations(entity(0), [sprite("Content/Images/Sprite.png")]);
{"Data":{"Annotations":[{"TypeName":"MAR.Game.Shared.Models.Annotations.SpriteAnnotation","ImagePath":"Content/Images/Sprite.png"}],"Target":{"IsSelf":false,"IsPartyMember":false,"IsEntity":true,"IsUniqueID":false,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null}},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Animation.AddAnnotationsCommand"}

Add a Text Annotation to Self

Attaches a text annotation displaying a message to the current entity.

add_annotations(self, [text("Hello")]);
{"Data":{"Annotations":[{"TypeName":"MAR.Game.Shared.Models.Annotations.TextAnnotation","Text":"Hello"}],"Target":{"IsSelf":true,"IsPartyMember":false,"IsEntity":false,"IsUniqueID":false,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null}},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Animation.AddAnnotationsCommand"}