Event touch from which angle

Hi, I would like to find out when an event touches player, where the touch comes from. e.g If the event touch happens from top, left, right, or bottom. What I wanted to do is make my player jump 1 step backwards when the event touches them, but the event could come from left, right, top or bottom, so 1 step backwards doesn't work if the event is coming from the back from the player.
In my experience with event world obstacles like that, it's best to use a sequence of 4 Conditional Branches. Here's what I would do based on what you've described:

Code:
If (Chasing Event) is facing down:
{Set Movement Route:

Player Turn Up
Player Jumps backwards
Player takes X HP Damage}

=====

If (Chasing Event) is facing left:
{Set Movement Route:

Player Turn right
Player Jumps backwards
Player takes X HP Damage}

=====

If (Chasing Event) is facing right:
{Set Movement Route:

Player Turn left
Player Jumps backwards
Player takes X HP Damage}

======

If (Chasing Event) is facing up:
{Set Movement Route:

Player Turn down
Player Jumps backwards
Player takes X HP Damage}


Basically, you're going to be using the way your Enemy is actually facing to force the player to react a certain way through those 4 conditional branches. (By turning the player towards the enemy if the enemy event touches, and making the player jump away from them).

You can find the Facing Direction condition underneath the 3rd page if I'm not mistaken in Conditional Branches.
A
In my experience with event world obstacles like that, it's best to use a sequence of 4 Conditional Branches. Here's what I would do based on what you've described:

Code:
If (Chasing Event) is facing down:
{Set Movement Route:

Player Turn Up
Player Jumps backwards
Player takes X HP Damage}

=====

If (Chasing Event) is facing left:
{Set Movement Route:

Player Turn right
Player Jumps backwards
Player takes X HP Damage}

=====

If (Chasing Event) is facing right:
{Set Movement Route:

Player Turn left
Player Jumps backwards
Player takes X HP Damage}

======

If (Chasing Event) is facing up:
{Set Movement Route:

Player Turn down
Player Jumps backwards
Player takes X HP Damage}


Basically, you're going to be using the way your Enemy is actually facing to force the player to react a certain way through those 4 conditional branches. (By turning the player towards the enemy if the enemy event touches, and making the player jump away from them).

You can find the Facing Direction condition underneath the 3rd page if I'm not mistaken in Conditional Branches.
Ah! Makes sense. Thanks for the suggestions!
Works like a charm!

Original thread: https://forums.rpgmakerweb.com/threads/event-touch-from-which-angle.156688/