Skip to content

Close User Interface

Close User Interface

Closes a currently open user interface by its unique ID, or close all open user interfaces at once.

Properties

System

Name Explanation Type
Close All Whether to close all open user interfaces instead of a specific one. Toggle
User Interface ID The unique ID of the user interface to close. Variable or Value

Examples

Close All Open User Interfaces

This closes every user interface that is currently open.

close_user_interface(all);
{"Data":{"ID":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"","VariableIndex":0,"Metadata":null},"IsAll":true,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.UserInterface.CloseUserInterfaceCommand"}

Close a Specific User Interface by Variable

This closes the user interface whose unique ID is stored in Global Variable 0.

close_user_interface($gv[0]);
{"Data":{"ID":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"IsAll":false,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.UserInterface.CloseUserInterfaceCommand"}