specific issue with custom menu!

Hello, so I'm currently developing a game using RPG Maker 2003. I really wanted to have the Earthbound style menu and interact system, (a small menu that pops up when the player presses the interact key which then has the option to 'check' allowing the player to interact whatever is in front of them).

To create the menu I followed this tutorial, and then I created the interact system using this tutorial! It was super helpful and I managed to follow all the instructions 🙂 But I do have one issue which I cannot seem to fix!

When the player interacts with something, I want the menu to close. So they can press interact to talk to the NPC or read the sign etc, and the menu closes at that moment. At the moment, after the player interacts using that menu option, the menu continues to stay open and active. Here is a video showing what is happening.

I feel like I have tried everything to fix this but nothing seems to be working.

Here is the part of the code in the menu that is run when the player selects the interact option in the menu.
Screenshot_1.png


Screenshot_2.png


Screenshot_3.png


When the player wants to close the menu, they can press escape and the menu closes. So I thought I could reuse that part of the code to make the menu close after the player chooses the interact option, but when I do that it makes the player unable to move and the menu still open but not visible.

The part of the event that closes the menu is here:
Screenshot_4.png

Screenshot_5.png


The reason why I have the switch 'Pause Menu' is because previously when the player was opening the menu, NPCs would still move around and the world was not on pause. So I made the common event for Menu to be autorun, but with the condition switch 'Pause Menu'.
Screenshot_7.png


So the common event for key detection which I made from the custom menu tutorial calls the Menu event and turns the switch on when the key is pressed.
Screenshot_8.png


I don't know if this was necessary or if there was an easier way to do that but this way was working for me T_T but now I cannot have the menu close when the player uses the interact option. I'm sorry if this is confusing or explained badly 🙁 I appreciate any ideas or help!!
You're setting S[0002] to ON which should activate the [Menu] CE, but after that, you're also calling it manually. The first of these should be enough or it will occur again after the menu's first instance is gone. Setting V[0001] back to 0 and using the event-stopper is unnecessary. Just put the entire keys-process into a condition that needs S[0002] being OFF and place the 7-condition into the [ELSE] of 5.

Spoiler
Code:
<>If S[0002:Pause Menu] == OFF
 <>Key Input: [0001:Keystroke] (Confirm, Shift)
 <>If V[0001:Keystroke] == 5
  <>Switch [0002:Pause Menu] = ON
  <>
 : ELSE
  <>If V[0001:Keystroke] == 7
   <>Open Menu Screen
   <>
  : END
  <>
 : END
 <>
: END
<>

Then I've noticed you have put an empty move-route command targeting the player in [Close Menu]. What's that for exactly? Normally this is done to remove a previously forced repeating move-route that was applied to disable player-inputs for walking around (and I just don't see a reason for it here).

~炬燵あ
You're setting S[0002] to ON which should activate the [Menu] CE, but after that, you're also calling it manually. The first of these should be enough or it will occur again after the menu's first instance is gone. Setting V[0001] back to 0 and using the event-stopper is unnecessary. Just put the entire keys-process into a condition that needs S[0002] being OFF and place the 7-condition into the [ELSE] of 5.

Spoiler
Code:
<>If S[0002:Pause Menu] == OFF
 <>Key Input: [0001:Keystroke] (Confirm, Shift)
 <>If V[0001:Keystroke] == 5
  <>Switch [0002:Pause Menu] = ON
  <>
 : ELSE
  <>If V[0001:Keystroke] == 7
   <>Open Menu Screen
   <>
  : END
  <>
 : END
 <>
: END
<>

Then I've noticed you have put an empty move-route command targeting the player in [Close Menu]. What's that for exactly? Normally this is done to remove a previously forced repeating move-route that was applied to disable player-inputs for walking around (and I just don't see a reason for it here).

~炬燵あ

Hi, thank you for your response!

I changed the event accordingly! This makes sense, but unfortunately I still have the same issue as before.

Screenshot_1.png


As for the empty move route, I had a previous repeated player 'wait' movement when the menu opened, but I removed it now as it was unnecessary, thank you for pointing that out.

I altered the part of the menu event when the interact option is chosen to be like this:
Screenshot_3.png


So that it calls the CloseMenu event which is:
Screenshot_4.png


After doing this I have a similar sort of issue: The menu now closes when the player interacts but now when the player presses the enter key to close the text box etc the menu opens up again straight away.

The way I would like it is that the player presses the enter key, the menu shows. The player chooses the interact option, the menu closes and a text box shows depending on the interaction. The player presses enter to continue/close the textbox and continues as normal until they decide to open the menu again.

Original thread: https://forums.rpgmakerweb.com/threads/specific-issue-with-custom-menu.156834/