How to check which direction the player is facing

There is a portal in my game and I want the player to jump into it but the portal can be activated from any side. I don't want to make it so that you can only activate it from 1 side so is there a way to check to see which way the character is facing so I know which direction to make him jump?
There is a condition under conditional branch where you can set events to run if the player is facing up/down/left/right. Just put your 4 different jump commands under the appropriate conditional branch and it should work from there.
Yup. Bgillisp got that one. If you'd like a picture, I made the event up for ya. Just set the event to same as player, trigger action button. If you want dialogue, or a choice to use the portal, obviously put that before the jump commands.

Portaljump.png
@Ugouka


Thank you so much! Do you know if there is a way to make your character appear above the portal after he jumps into it?
No problem.


Erm. You mean stand on it before he teleports? For that you'd just enter a wait command for however long you wanted him to stand on it.


If you're talking on the other side of the portal, you could just set the transport coordinates to be above the portal, facing whichever direction you want.
@Ugouka I'm a bit confused. I just want my guy to appear in front of the portal instead of behind it.

Screenshot8.jpg
Oh! I see what you're saying now. Okay, just make sure you set the portal you're appearing under to "Below Characters" on its event page.
@Ugouka when I set the priority to below characters it makes me walk on the portal before asking if I want to enter. I want it to ask if you want to enter when you try to step into it.
Alright, experimented a bit. Make a second event page like below on all your portals. Obviously, the wait time is up to you. That's just to show that you are, indeed, on top of the portal.

usedportal.png
@Ugouka


I fiddled around with what you did. What I did was made the first event page have same priority and ask if u want to enter. When you say yes it turns on used portal which activates the second event page which has below characters priority and the conditional branches for which way you are facing. Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-check-which-direction-the-player-is-facing.60082/