You can make the same event perform multiple different functions, so yes, it is possible to do what you are asking.
The simplest way that I can think of is just to have conditional branches that check which direction the character is facing, and to react accordingly.
For instance, if the character is facing north, have the gate temporarily open, use a move event to pass the character through the now open gate, and then have the gate close again behind the character once the move has been completed.
Personally, I use RMVXA, so I'm not sure what differences the two systems have, but I'm fairly confident that your program will have all of the necessary calls to make this happen.
What this sort of event would look like is something like this:
- Conditional branch to check which direction the character is facing (make sure the event is set to activate on action button).
- Turn a switch on to tell the event to process accordingly (This can be any switch, just name it so you know which switch does what).
- Create a new event page in which the requirement to run is to have said switch turned on. (Make this page autorun or parallel process, I recommend autorun)
- Make sure the new page is set to either below characters or through is turned on (in the bottom left corner of the event settings), and that the new page doesn't have a graphic so it looks like the space is open.
- Make a move event that moves the player (x) tiles through the gate to the other side, where x is the number of spaces you need to move to get beyond the gate (set this to wait so that the event will only continue processing once the move action has been done).
- After the move event, turn off the switch that you turned on earlier so the event will go back to its original state on the first page. I recommend inserting sound effects where appropriate for when the gate is opening, and when the gate is closing.
Make sure you set up a page for each direction you are facing if you use this method. If you don't want to use switches and multiple pages for your event, you can also put everything onto one page using the same conditional branches that check which direction you are facing. You will just have to put in a few more things, such as changing the event graphic and toggling through on and off for each conditional branch.
If you need any more help, please feel free to ask. The people here are all willing to help.