Skip to content

Open Menu

Open Menu

Opens a new menu user interface, optionally including the context of the current menu.

Properties

System

Name Explanation Type
Global Whether the variable used to store the unique ID is global. Toggle
Include Context Whether to include the context of the current menu when opening the new menu. Toggle
Local Whether the variable used to store the unique ID is local. Toggle
Menu The menu user interface to open. User Interface
Store ID Whether to store the opened menu's unique ID in a variable for later reference. Toggle
Variable Index The index of the variable to store the menu's unique ID in. Number

Examples

Open a Menu User Interface

This opens the menu identified by the given unique ID.

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

Open a Menu and Include the Current Context

This opens the menu and passes along the context from the currently focused user interface element.

open_menu("a1b2c3d4-e5f6-7890-abcd-ef1234567890", include_context);
{"Data":{"IncludeContext":true,"Index":0,"IsLocal":false,"MenuID":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","StoreID":false,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.UserInterface.PushMenuCommand"}

Open a Menu and Store Its Unique ID in Global Variable 0

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

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