Skip to content

Toggle Main Menu Lock

Toggle Main Menu Lock

Toggles whether the main menu is enabled or disabled for the current map scene.

Properties

System

Name Explanation Type
Is Enabled Whether the main menu is enabled. When disabled, the player cannot open the main menu. Switch or Value

Examples

Disable the Main Menu

This disables the main menu, preventing the player from opening it.

toggle_main_menu(false);
{"Data":{"IsEnabled":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":false,"SwitchIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.MainMenu.ToggleMainMenuCommand"}

Enable the Main Menu

This enables the main menu, allowing the player to open it again.

toggle_main_menu(true);
{"Data":{"IsEnabled":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":true,"SwitchIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.MainMenu.ToggleMainMenuCommand"}

Toggle the Main Menu Based on a Global Switch

This sets whether the main menu is enabled based on the value of Global Switch 0.

toggle_main_menu($gs[0]);
{"Data":{"IsEnabled":{"IsGlobalSwitch":true,"IsLocalSwitch":false,"IsValue":false,"Value":false,"SwitchIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.MainMenu.ToggleMainMenuCommand"}