Help with a hiding event?

I'm working on my first project currently, using it as a way to get used to rpg maker. But i've come across a problem that i cant fix just by google and some good luck with messing around.

I'm trying to allow the player to "hide" in a closet. I've set the first event page to turn player transparency on when the action button is pressed, and also turns a switch on. The second page (activated by the switch) turns the transparency off when the action button is pressed, as well as the switch from the first page so that the player can hide in this location multiple times.

My question is, how can i make it to where the character cannot move between event pages/button presses? When the player moves, its easy to lose track of the event tile and therefor make one unable to turn the transparency off.

(also i pray this is in the right category, im not one to do form posts ;^; )
Yes, this is the correct place ;-)

Can you show us screenshots of your events? such a system is tricky, and we need to see exactly what you have done to be able to help you.

That said, I would start with making the second age an autorun (those block all regular player input) and check for specific buttons inside the autorun to end it.
Thanks for helping out, im so new to all of this! These are the event pages that i have, im not sure they are the most efficient way of doing this since i really only messed around to see what worked.

help.png

help2.png
One of the easier techniques you could use is to enable player transparency and direction fix, then teleport the player onto an area of the map where they cannot move. After time has passed, you can move the player back into position and remove the transparency and direction fix. Just make certain the position on the map you move the player to is surrounded by impassible tiles.

Spoiler
event-vanish-teleport.png
The script call for moving players around on the map (within a Player Move Route event call) is as follows : self.moveto(x, y)


EDIT: Eeh, thinking more on it, probably not best to use that on maps that are larger than the default size due to screen centering on the player.
But by doing that, it removes the "press key to unhide" feature that i originally had....and after some further playing around with my events i cannot see how i can make using character move routes to work while also letting the player control when to end the transparency. I want to keep the ability to press a key to revert back to being seen. ;u; 
Ah, sorry, I meant for the two player Move Route calls in my example to be used within your event set up. Unfortunately, there is no non-script, simple way to restrict player movement.


But, I would suggest looking into Yanfly's 'Stop All Movement' script. Using that script, you could do the following :

Spoiler
event-vanish-stop.png

event-vanish-stop-b.png
I managed to work it out on my own! In the first page of my original event i placed a player transfer with no fade, moved the player to a solid block, then on that block i placed another event. a no-fade transfer set to the original position as well as a no-transparency command.

placing some pics for people who may have the same problem that i did. just have to remember to place the second event on the tile that the first event transfered to! Thanks to everyone who replied but i guess just messing around is the best option for me haha

 

1.png

2.png

Original thread: https://forums.rpgmakerweb.com/threads/help-with-a-hiding-event.41853/