Hiya everyone! Hope you're all doing fantastic!
I am here to ask another question: is there a way you can turn a switch ON whenever the menu is opened?
I think you have to modify the function that opens the main menu to also turn on a switch, because you can't normally run common events while the main menu is open. In other words, you need a plugin, or to write one.
I would've made the same suggestion as AquaEcho. But... what do you actually want to do with the switch? Like AquaEcho said, events don't normally run in the menu, so I'm curious what you're doing with the switch. Do you also want the switch turned off when the menu is closed? Or maybe you want a map event to fire after the menu has been used?