RM2K3 - Autorun Common Event Ignoring Switch Off

Hello again everyone!

I've started implementing a custom pause menu that I've designed (solely using images), but I've been having a puzzling problem. In order of what is and isn't working:

O The pause menu buttons (0-9) won't activate unless Key Detection is on
O When Key Detection is on, pressing 0-9 will turn on Pause Menu Active and bring up the pause menu
O I seem to be able to navigate the basic pause menu (so far only tested on two basic screen); from the main menu, pressing 1 brings up P-Menu-1-Analysis, and pressing 0 takes the player back to P-Menu-0-Main
O I am able to exit the pause menu

X Once the pause menu has been exited, the Pause Menu event continues to run, even though I have told it to turn 'Pause Menu Active' and told it to End Event Processing
X While the game continues to run, pressing button 0 or 2-9 will bring up P-Menu-0-Main, but pressing 1 will instead bring up P-Menu-1-Analysis

I'm not 100% sure what I'm doing wrong here. I feel it has something to do with how I am using an Autorun process when the pause menu opens, but judging by the documentation, that's what I need to use to pause the game, as there's no other consistent way (without a lot of redundant individualised code) to stop every other event from running until the pause menu has closed.

I would greatly appreciate any help or insight that can be given! <3

Many thanks in advance,
Majike (She/Her)
End/Exit Event Processing doesn't do what you think it does. It simply moves the pointer to the next command to the bottom of the event. For map events with normal triggers, this means the event just ends. But for common events conditioned by a switch, and map events that have an autorun or parallel process trigger, once it gets to the end of the event, it starts over again.

If you want the event to stop, you have to turn off the switch.
index.php

Put turn off switch in the last.
And put big portion of your code on common event without trigger and try to run it
Try make autorun common event short.. If to big. Just put the even on other common even
End/Exit Event Processing doesn't do what you think it does. It simply moves the pointer to the next command to the bottom of the event. For map events with normal triggers, this means the event just ends. But for common events conditioned by a switch, and map events that have an autorun or parallel process trigger, once it gets to the end of the event, it starts over again.

If you want the event to stop, you have to turn off the switch.

That's good to know about End Event Processing, but that's otherwise what's puzzling me: under the Pause Menu code, under the list of actions to execute when you press 0, one of them is 'Control Switches: [0012: Pause Menu Active] = Off', which is the condition switch for running the pause menu.

Shouldn't that mean that when it reaches the end of the current event, instead of looping, it sees that Pause Menu Active is now Off, so it shouldn't try to loop again?
I am not quite sure HOW exactly, but I managed to solve my issue, and I wanted to provide a link to an Imgur gallery containing the now-fixed Common Events for anyone who might be struggling with a similar issue in the future! <3

Imgur Gallery

Much love! x
I am not quite sure HOW exactly, but I managed to solve my issue, and I wanted to provide a link to an Imgur gallery containing the now-fixed Common Events for anyone who might be struggling with a similar issue in the future! <3

Imgur Gallery

Much love! x
u3YzEkb.png

this common event worried me actually.
try to not active the switch 12 at the end of commont event.. there is posiblity your game crash or something buggy happen
after called event. turn it off the switch. If you need.. tried make it run on black map not on dungeon or city.

I don't know your ways is okay.. But since is no problem.. then dont touch it
* give mc hammer meme

Original thread: https://forums.rpgmakerweb.com/threads/rm2k3-autorun-common-event-ignoring-switch-off.155034/