Menu triggering a plugin command

Hello there!

My question is simple. I have some plugins in my game that put buttons and pictures on the screen. I want them not showing whenever the menu is open and them to appear again as soon as the menu is closed.

For the example's sake, imagine all plugins' functions I want to toggle could be handled by the commands "pluginX activate"/"pluginX deactivate".

Is there a way to trigger a command whenever the menu scene is called and another when it is closed?


Thank you!
yes and no - you can modify the engine to contain script functions on opening or closing, but using plugin commands at that moment is much more difficult.


However, that should be no problem as the plugin command is usually only an API to trigger script functions, so you can place the corresponding script functions directly.


But you can only activate or deactivate mechanics where the plugin creator provided the functions for activation/deactivation. If the plugin is written to be always active, then you can't deactivate it.
The plugins I'm referring to all have on/off commands or pretty similar functions.

So there's no option apart from tinkering with scripts?
The menus are scripts, and any change there can only be done by other scripts - usually in the form of plugins.


And as explained above the plugin command is only a way to make giving script commands easier from outside, but if you are already on the scripting level the plugin interface is actually more work than a direct function.

Original thread: https://forums.rpgmakerweb.com/threads/menu-triggering-a-plugin-command.56316/