# How to move while a timer is going in an event

I'm trying to make a switch activated gate and this is what I have setup so far "picture #1"

but what happens when the timer is going on, I cannot move. so what I'm trying to do is go through the gate "while the gate is open" but have a timer to reset the gate to close.

## 1 Answer

First, you need to check "Direction Fix" for the switch event. If you leave it unchecked, the event will turn to face the player when it's activated, and the facings for the graphic you've chosen for the switch have been used for something else: the states of the switch (down is switch left, left is switch middle, right is switch right, up is switch missing).

Assuming that 132 frames is the period for which the gate needs to be passable, and that the gate has a typical door graphic (down is closed, left is nearly closed, right is nearly open, up is open), your event code could set movement routes for both the gate and the switch, waiting for neither to complete (uncheck wait for completion when editing the movement routes).

The movement routes flip the switch and open the gate, wait for 132 frames, and finally close the gate and reset the switch:

Text : None, Window, Bottom
: you flip the switch
If : door opened is OFF
Set Movement Route : This Event
: Switch ON : 0001
: Direction Fix OFF
: Turn Left
: Wait : 5 frames
: Turn Right
: Wait : 142 frames
: Turn Left
: Wait : 5 frames
: Turn Down
: Direction Fix ON
: Switch OFF : 0001
Set Movement Route : The Gate
: Wait : 5 frames
: Turn Left
: Wait : 5 frames
: Turn Right
: Wait : 5 frames
: Turn Up
: Through ON
: Wait : 132 frames
: Through OFF
: Turn Right
: Wait : 5 frames
: Turn Left
: Wait : 5 frames
: Turn Down
End