Skip to content

Open Overlay

Open Overlay

Opens a new overlay user interface, optionally storing its unique ID in a variable.

Properties

System

Name Explanation Type
Local Whether the variable used to store the unique ID is local. Toggle
Overlay The overlay user interface to display. User Interface
Store ID Whether to store the opened overlay's unique ID in a variable for later reference. Toggle
Variable Index The index of the variable to store the overlay's unique ID in. Number

Examples

Open an Overlay User Interface

This opens the overlay identified by the given unique ID.

open_overlay("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
{"Data":{"Index":0,"IsLocal":false,"OverlayID":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","StoreID":false,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.UserInterface.OpenOverlayCommand"}

Open an Overlay and Store Its Unique ID in Global Variable 0

This opens the overlay and stores its runtime unique ID in Global Variable 0 for later reference.

$gv[0] = open_overlay("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
{"Data":{"Index":0,"IsLocal":false,"OverlayID":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","StoreID":true,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.UserInterface.OpenOverlayCommand"}