Picture Show/Erase when pressing 'Menu'

Hello~! I do not whether this thread fits in this board of topic.

I currently have a picture that appears along the game. It is currently a common event tied under an ON switch, has a variable for it and is trigger is "parallel". The amount of this variable affects the picture displayed, and boy there are a lot of it. It can also be changed/altered by the player through the use of items or other events.

I managed to make it work through events, which disappears when an event starts, and reappears once the event is finished.

As the title says, is it possible to show/erase when pressing 'Menu', where when a menu is active, it erases, and reappears when the menu is not in use. Can it be done via script? common events? or through a plugin?

Any help, suggestion, or feedback is appreciated.
In my view you posted in the right place, as this can be done with both Events and Javascript.

Try using "conditional branching" in the event that shows the Picture:
Code:
<>If : Button [Cancel] is pressed down
    <>Erase Picture
    <>
:Else
    <>Show Picture
    <>
:End

Or instead of checking the button, using javascript, explained in this topic:
In my view you posted in the right place, as this can be done with both Events and Javascript.

Try using "conditional branching" in the event that shows the Picture:
Code:
<>If : Button [Cancel] is pressed down
    <>Erase Picture
    <>
:Else
    <>Show Picture
    <>
:End

Hmmm, yes it is indeed working, but it gets way too late, resulting in the picture still showing in the menu, and taking effect after the menu disappears.

Oh dear, I think I should clarify a few things:

First, the picture will always display throughout the game.

Second, I have to use both OFF/ON switch and ERASE/SHOW picture to make the effects work, otherwise it won't be affected, hence the situation above, were the menu beats it first.

Perhaps I would need to put this certain issue on another thread. If I wish to make it run quicker, this might be an issue of parallel events affecting performance.
So do something different, disable the default menu:

Then, call it to the same event that erases the Picture:

Original thread: https://forums.rpgmakerweb.com/threads/picture-show-erase-when-pressing-menu.136152/