MZ Check if Common Event is Running

Can anyone help me on how to check if a specific Common Event is currently running through a Javascript code? Or give any pointers on different ways to accomplish what I'm trying to achieve.

I have an Event that activates (as a Parallel) on the current map when the Player equips a Tool. When the character uses the OK button it activates the animation. The default OK button for its usage is pretty mandatory and I would not like for that to be changed. The problem I'm having is the Quick Equip Common Event that runs (which allows you to equip the tool for use) when you press the Q button and the OK confirmation it requires is also activating the "Use Animation" in the parallel event on the map. Hence, I was thinking to do a script which makes sure a specific common event is not running.

Thanks for your time! 😢
I Think it's
Code:
$gameMap._interpreter.isRunning()
for knowing map event interpreter is currently running

but need another code to know the running one is the event you want or not... (not on my laptop now so i cannot check it >.<)

hope this help
Hi! I'm not super experienced with with the game's JS functions outside of the battle system. But, my first thought when I read your question would be to activate a switch or set a variable to 1 when your specific event is running, and turn that switch off or set that variable to 0 when it is not running.

You can then use your script call / plugin to just check the status of the switch or variable.
Thank you both for your suggestions. :LZSexcite: I'm going to fool around with the Javascript given to see if I can get it to work and if not I'll most likely do what you suggested, Kenen!
@adria
Since parallel common events require a switch to be triggered, why not just track whether or not the switch is flipped ON? Kinda like what @Kenen was alluding to. Unless I'm misinterpreting what the dilemma is.

Original thread: https://forums.rpgmakerweb.com/threads/check-if-common-event-is-running.134295/