MZ Need Help with Controlling Parallel Common Events During Cutscenes, Dialogue, and Other Conditions

Hi RPG Maker Friends,

I am "once again asking for your help" expanding my knowledge and control over the game's systems.

Let's see how simply I can describe this.. In my game, I have (or have partially finished the systems of) numerous common events that run as parallels. I am typically using these methods to expand the game's capabilities in terms of how you can interact with the world, beyond native RPG Maker style and toward a more "modern standard" if you will. Nowhere near as far as an action RPG (that's way beyond me), but just more options and more streamlined.

The idea generally goes like this:

Turn a switch on, and now you're in "spellcast mode." Now, there's a parallel listening for when you press Page Up. When you press Page Up, you cast a spell! Or use a special item. Or see into a special layer of the world.

Another thing pressing Page Up may do if you're in another "mode" is open a radial UI which contains abilities or items.

These systems were really cool and I was so proud of myself for even making them. But now, I'm looping back in my development cycle to further build out those systems, and the problem is this: That parallel listens for Page Up, all the time.

That means during dialogues, cutscenes, and events in general, you could manifest a fireball, or bring up the radial UI- which is obviously not the desired behavior, and in worst case can throw a lot of stuff off.

Now, here are the bandaid solutions, and I am not going to do them- I would like instead for someone to point me where I need to look to get deeper control over the game's systems:

1) Tag every single event with a switch or conditional that says, "Disable the Radial UI/Ability X during this event sheet." While that would work, it's not sufficient and the game is way too large for that to be practical sadly.

2) (I think?) Change the special abilities to Autoruns so they don't interrupt other events. However that too is not sufficient as it doesn't give me the education I need about how things work and how to control things so that I don't make things suck for players. In addition, some things I do want to be parallels- I don't want them to totally freeze all events in the game while they run. Lastly, I did try changing some abilities/menus to autorun- that seems to cue them up during the current event, and then they run/menu appears right when the current event ends. That's not the correct/desired behavior.

So, what I am looking for is the script calls/places to look to educate myself/information about how the game handles things so that I can graduate to a new level of digital puppetry and not make an un-fun, janky game.

I did find one call which is on the right track, but not nearly complete: $gameMessage.isBusy(), which checks if message windows are open. That's on the right track of what I'm looking for, but it's not nearly everything.

I do have a Visustella plugin which allows common events to be bound to any keystroke and shows the binds on an action bar. This plugin is really good about disabling you from running these commons when another event plays (the bar generally vanishes and everything), so I absolutely know the type of thing I'm trying to achieve is possible. However, I can't look inside the plugin's code (nor would I know what all to look for if I could).

Open to anyone with thorough knowledge dropping some mind expanding answers on me, or where I should go to deepen my education a little bit.

Thanks as always.
It sounds like what you want to be looking at is $gameMap._interpreter.isRunning(), which will return true if a map event is being processed currently.
@Trihan Thank you so much Trihan. I used that in a couple different ways on two of the events I was using, and it seems it did resolve the problem behavior. That gives me the level of control I was looking for, so thank you.

I do have a couple additional questions:

1) Would you happen to have any links where I could read in more depth about concepts like this, what the interpreter is, how it behaves/order of priorities etc.? You know, like what such things are, what their names are, and what their logic is? Broad question I know. But as an example, I thought parallel commons ran "all the time" but just found out through an accident last night that parallels actually restart from the top of their events sheet when you transfer maps. If nothing off the top of your head, no problem.

2) Do you have a link you know of that contains a thorough documentation of script calls like this one, and what they do? I found one that was linked on the forum as a google doc, I thought it was very complete, but found out it was not. I've used it for a long time, but eventually found a lot missing. Lots of very powerful calls, like the one you mentioned, are not on that document and I've had to scour the forums for many of these powerful calls to use in my game.

Thank you again, just this little command has made a lot possible.
@Trihan Thank you so much Trihan. I used that in a couple different ways on two of the events I was using, and it seems it did resolve the problem behavior. That gives me the level of control I was looking for, so thank you.

I do have a couple additional questions:

1) Would you happen to have any links where I could read in more depth about concepts like this, what the interpreter is, how it behaves/order of priorities etc.? You know, like what such things are, what their names are, and what their logic is? Broad question I know. But as an example, I thought parallel commons ran "all the time" but just found out through an accident last night that parallels actually restart from the top of their events sheet when you transfer maps. If nothing off the top of your head, no problem.

2) Do you have a link you know of that contains a thorough documentation of script calls like this one, and what they do? I found one that was linked on the forum as a google doc, I thought it was very complete, but found out it was not. I've used it for a long time, but eventually found a lot missing. Lots of very powerful calls, like the one you mentioned, are not on that document and I've had to scour the forums for many of these powerful calls to use in my game.

Thank you again, just this little command has made a lot possible.
If you check out my Jump into JavaScript series, it goes through every line of code in the default engine and breaks it down with full explanations of what things do and why. I'm not into the interpreter yet but I'll get there.

I might do a mini-tutorial on the inner workings of the interpreter in the morning, it is one a lot of people ask questions about.
Thank you kindly again.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-controlling-parallel-common-events-during-cutscenes-dialogue-and-other-conditions.152022/