Help with picture based menu!

Okay, so I've been trying to make this work for hours but I'm feeling completely miserable.


I pretty much have this exact set up but now I'm adding my own custom map instead of premade ones shown in the tutorial, like Skill menu, item menu etc.
My major trouble here is going to and back between my two custom menu. Going from menu1 to menu2 was easy but going from menu2 back to menu1 wasn't (using cancel/esc key).

I believe the main issue is both menus/common events having parallel triggers and since most of the conditional branch contains If Button [Cancel] is being pressed or like If Button [OK] is being triggered and I believe they are overlapping? or something.

1. I tried using control switches to prevent one from running while the other one runs but I failed at that. Should I even be using control switches?

2. Should picture menus all have parallel triggers? Or does it depend? (I'm guessing it depends on what you're trying to achieve.)

3. This question is in general, and basic stuff but I'm still confused.
RPGMZ_2023-12-20_03-35-57.png

Let's say I call this common event. In the middle of the code menu1 switch turns off. But at this point does it keep running through the end or will it just stop the moment the switch turns off?


4. This is an example I made very close to one of my tens of trial and errored events.
RPGMZ_2023-12-20_04-17-39.png

RPGMZ_2023-12-20_04-19-59.png

RPGMZ_2023-12-20_04-18-10.png

RPGMZ_2023-12-20_04-23-16.png

RPGMZ_2023-12-20_04-19-59.png


a) General question, Is it possible to break a loop running on a, let's say Common Event 1 on a different common event?
b) If I were to jump to menu2 from menu1 and call menu1 again, will it run from the top again or will nothing happen since menu1 is stuck in a loop?
c) The above scripts are full of errors obviously because it doesn't work... What exactly can I do to fix it? I have a feeling the usage of control switches are all wrong.

My ultimate goal from this is to successfully navigate from menu1 to menu2 and from menu2 back to menu1 without any abnormalities.
I'm hoping you guys can shed me some light on how to make this work. Sorry for the long post!
I'll try to help from quick glance.
It seems your version has misplaced cancel branch.
It should be on the same level as OK branch, not inside of it.
Also in the tutorial it's not whether the button OK and cancel being pressed, but being triggered.
Re-check this part, yours is different. 🙂
Menu Picture.PNG
As Epic said, both your nesting is incorrect and you're not using the event commands shown in the tutorial you linked to.

A good way to start something like this is to not have all of the junk for your menus.

Just make the switches and the conditional branches for checking the button input, then the only thing in your "menu" is a Show Text that says "went to menu 1," "went to menu 2," etc.

That way you check that your buttons and the event logic is correct and it's all very readable without pages and pages of show images and stuff like that.
I'll try to help from quick glance.
It seems your version has misplaced cancel branch.
It should be on the same level as OK branch, not inside of it.
Also in the tutorial it's not whether the button OK and cancel being pressed, but being triggered.
Re-check this part, yours is different. 🙂
Thank you. That was an error while making the example.
What's the actual difference between 'being pressed' and 'being triggered'?
I thought pressed means while being held down, and triggered - once you press and take your finger off the key.
isPressed() will return true whenever the button is, errr, pressed.
isTriggered() will return true if the button goes from being unpressed to pressed.

Looking at the code it seems that isReleased()is only available for touch input.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-picture-based-menu.164017/