if you have an evented menu (like in my spoiler), pressing X or ESC open the menu,
but it doesn't close when you press X or ESC again.
in order to do that (which is stated in the helpfile) is to use the
Plugin Command: RevertButton Cancel so it will work again.
you place the plugin command inside the conditional brance before it opened the event,
than you can close it as well.
or you can explain a bit more in what event you want to use it for?
I dont say you have to create an evented menu, it was an example on the way
you built your event.
it is possible without the event on every map, but it require a work around.
but when you activate a common event with a button to pop up and close,
do you use the plugin command: RevertButton Cancel (which is the X, ESC buttons)
if you use another button, let say T to open T and close, there is probably a button
to use as well, RevertButton T or the code of it (need to check the helpfile for that).
if those doesn't work, it might be a bit modified, but than we need to see the event itself,
or explain what the event does.
open and close, needs the revert button so it become useable again when you toggle
something.