[RM2K3] CLOSING CUSTOM MENU AFTER INTERACTING WITH AN EVENT

Posts

Pages: 1
Hi, I'm having an issue with my custom menu system in RPG Maker 2003. I'll try my best to explain everything!

First I followed these two amazing tutorials, the first one was this custom menu tutorial, and the second one was this interact feature.

The second tutorial showed me how to create a check option just like the one in Earthbound Beginnings. In Earthbound Beginnings the player presses the interact key (in my game it would be spacebar) and a menu would open up. The first option in the menu would be check/interact. The player presses the interact key again which then runs the event in front of the player. For example, if you use this option whilst facing an NPC, you would see the NPC's dialogue. Or if you use this option whilst facing a chest, the chest would open for the player. But if you use the check option when there is nothing in front of the player, a dialogue box saying "Nothing here" or something similar would appear. The player then presses the interact key/spacebar to continue, closing the dialogue box and is able to move around again. You can see this feature in the this gameplay video if you want (7:19).

I have almost everything working, but the main issue I am having is that the menu wouldn't close after interacting, and the player would have to press the cancel button (esc) to manually close the menu.

After altering the events a bit, the menu now does close but after the player presses spacebar to close the dialogue box/to continue, the menu opens up again.

I want it so that the player can press spacebar, the menu opens. Press spacebar, the interact option is chosen, a dialogue box opens. Press spacebar, the dialogue box is closed and the menu is closed. The player is free to move around.

Here are screenshots of my common events:

This is the key detection common event. When the player presses the 'select' key, it turns on the switch called Pause Menu.



This is my menu common event that is triggered. I have shown the section for what happens after the player chooses the interact option in the menu. Two events are called, the close menu event and the interact event.



This is my close menu event that is called. Ordinarily when the player presses the esc key whilst the custom menu is open, this event is called and the menu is closed.



And finally this is the interact event. It calls two other events that are identical to the tutorial I followed (linked above).



I am really sorry if I explained this poorly, I feel like I have tried everything to fix this. I'm super grateful for any ideas at all on how to fix this :) I originally posted this question on the RPG Maker Forums but haven't found any answers yet so I thought I would try here!

Let me know if there is any confusion with my post :)

Autorun is dangerous. You should be able to achieve everything with parallel process what is turned on/off by switched.

My initial instinct here is to use a single button for opening and closing your menu, and to have that button be different from your interactive button.

For my CMS I use shift to open and close the menu system. However, I have a switch I can turn off if I want to disable the menu. For example, if I'm in a battle and the keys all need to do something different. So when a battle is called the first thing that happens is the option to use the menu is disabled. At the end of the battle, it's enabled again.

You'd want to use a switch for the same purpos for interaction. One switch says "this option is on/off in the menu system" and another switch activates interactive mode.

Lets use 3 switches and call them:

menu (runs CMS code)
interact opt (distinguishes if interact option is checked)
interact (runs interactive code)

---------
If menu on;
Turn interact off

If menu off:
If interact opt on;
Turn interact on.
---------

There are a number of ways the above could be put into your parallel processes but I would probably run this as it's own ongoing parallel process. It will only allow your menu or your interactive system to run at a time, not both.

All your key processing would exist inside your interact and menu systems. This way you coyld use the same button for both systems if you prefer.
Pages: 1