Skip to content

Change Function ​

Category: Flow

An event content that toggles the visibility of a function button (currently the "Menu" button) always displayed on screen. It is used in situations where you do not want the player to freely open the menu, such as during story progression, before boss battles, or during cutscene playback.

Currently only the MENU button is supported

This event content currently controls only one type: the MENU (Menu) button. In the future it may support other function buttons (STATUS, ITEM, etc.), but currently it is MENU-only.

About the Menu button

The RPG Wizard G runtime has a mechanism for continuously displaying a Menu button on screen. It is drawn with the button design and display text (menu_button / menu_text) configured by the user on the System tab, and when the player clicks this button (or presses the INPUT_MENU key) the main menu screen opens.

Property list ​

Item (tscn label)Input formatDescription
Menu (MENU)CheckboxON = show the menu button, OFF = hide

Property details ​

Specifies the display state of the menu button.

  • ON (checked): Show the menu button (the player can open the menu screen)
  • OFF (unchecked): Hide the menu button (the player cannot open the menu screen)

Runtime behavior ​

When this event content is executed, the following processing is performed:

1. Change the display state of the menu button ​

  • ON case: Sets the on-screen menu button to visible = true
  • OFF case: Sets visible = false to hide it

2. Save the state to save data ​

The button's display state is saved to hud.function_button.visible.menu_button in save data. The state is retained across save/load and is restored to the same state when the game resumes.

3. Proceed to the next event content ​

Once the state change is complete, it proceeds immediately to the next event content.

4. Key input is also disabled while hidden ​

When the menu button is hidden, the INPUT_MENU key (keyboard menu assignment) also no longer opens the menu. This mechanism allows both click and key input to be controlled simultaneously.

5. Difference from automatic control during window open (enable_process) ​

  • Automatic control (enable_process): While some window (Item / Status / Shop, etc.) is open, function buttons are automatically disabled/hidden (controlled internally by the runtime).
  • This event content (Change Function): The user explicitly toggles the display state. Use it when you want to prohibit the menu for scenario reasons.

Typical usage flows ​

Flow 1: Prohibit menu at event start → release at end ​

Turn the menu off before a story scene and turn it back on after it ends:

  1. Change Function (this event content) (MENU: OFF) ← prohibit menu
  2. Fade Out Screen (black, time 1.0)
  3. (story scene)
  4. Fade In Screen (black, time 1.0)
  5. Change Function (this event content) (MENU: ON) ← restore menu

Flow 2: Prohibit menu before boss battle ​

Prohibit the menu during boss battle staging, restore after battle:

  1. Show Text ← "This boss is a tough enemy...!"
  2. Change Function (this event content) (MENU: OFF)
  3. (battle preparation staging)
  4. Start Battle
  5. (after battle ends)
  6. Change Function (this event content) (MENU: ON)

Flow 3: Prohibit menu during tutorial ​

Limit operations until tutorial completion:

  1. Change Function (this event content) (MENU: OFF)
  2. Show Text ← tutorial explanation
  3. (tutorial progression)
  4. Change Function (this event content) (MENU: ON) ← release after completion

Flow 4: Conditional menu prohibition ​

Prohibit the menu only during a specific variable state:

  1. Conditional Branch (Formula {flag_critical_event} == 1)
  2. Change Function (this event content) (MENU: OFF)
  3. Else
  4. Change Function (this event content) (MENU: ON)
  5. End If

Flow 5: Prohibit menu during cutscene playback ​

Always prohibit the menu during important staging:

  1. Change Function (this event content) (MENU: OFF)
  2. Show Image × multiple
  3. Play Animated Image
  4. Wait
  5. (cutscene ends)
  6. Change Function (this event content) (MENU: ON)

Flow 6: Opening at first launch ​

Prohibit menu immediately after game start, allow after opening ends:

  1. (game start event)
  2. Change Function (this event content) (MENU: OFF)
  3. Show Text × opening text
  4. Change Function (this event content) (MENU: ON) ← menu unlocked after opening ends

Typical combinations ​

For the overall picture, see Combination pattern collection.

Event start/end pattern ​

Toggle at the boundary of important events:

  1. Change Function (this event content) (OFF)
  2. (important event processing)
  3. Change Function (this event content) (ON)

Battle preparation pattern ​

Prohibit menu during pre-battle staging:

  1. Change Function (this event content) (OFF)
  2. (pre-battle staging)
  3. Start Battle
  4. Change Function (this event content) (ON) ← after battle

Combination with conditional branch ​

Dynamic control according to game progress:

  1. Conditional Branch
  2. Change Function (this event content) (ON/OFF according to each condition)
  3. End If
Related event contentPurpose
Fade Out ScreenCombined with scene-change staging to prohibit the menu
Fade In ScreenPaired with scene-change staging
Start BattleMenu control before and after battle
Conditional BranchDynamic control based on conditions
PageRelated content
System tab (editor)menu_button / menu_text settings (menu button design and text)
Event content indexList of all event contents

Notes ​

Currently only the MENU button is supported ​

What this event content can control is currently only one type, the Menu button. Other function buttons (STATUS, ITEM, etc.) are planned for future expansion.

Saved to save data ​

The menu button's display state is saved to save data. Because the state is retained across save/load, the behavior is "prohibit menu during event and save → menu remains prohibited after load". We recommend always turning it back to ON at the end.

Key input is also disabled while hidden ​

When set to OFF, not only clicks but also the INPUT_MENU key (ESC, etc.) on the keyboard will no longer open the menu. While this prevents unintended menu launches, it can cause operational confusion during debugging, so be careful not to forget to restore it.

Beware of confusion with enable_process ​

The runtime automatically disables function buttons while other windows (Item, Status, etc.) are open. This automatic control is separate from the explicit control by this event content. The display state set by this event content is maintained even after the window is closed.

If not restored to ON after event ends, permanently hidden ​

After setting to OFF by this event content, if the event ends without restoring to ON, the player will not be able to open the menu throughout the entire game. Always restore to ON at the exit of the scenario, or provide a mechanism to set it to ON in another event.

Follow-up on language switching ​

The display text on the menu button is automatically redrawn when the language is switched in the game settings. The user does not need to write additional processing.

Little meaning in using this event content while a window is open ​

While a window (Item, Status, etc.) is open, event processing including this event content does not proceed in the first place (enable_process=false), so you do not need to worry about behavior while a window is open.