open and close door with switch

How do I open and close the door with a switch, the door is on the same map
Give your door event 2 pages. The first page will have the closed door, and the second page will have the open door. If you want to do a transfer, put that on the second page and make it Player Touch. Condition the second page by a switch.

Then on the event you're using to control the door, turn on that switch when you want the door to open, and turn it off when you want it to close.

Original thread: https://forums.rpgmakerweb.com/threads/open-and-close-door-with-switch.142332/