Event touch + Player touch event

I'm trying to make an event + plan to make more events that use multiple triggers which will cause a different outcome depending on which was triggered.
However, simply having 2 event pages doesn't allow this, as only one will be active.

I tried looking for scripts and had no luck, which makes me feel like I'm overlooking something very simple because I feel this
would be something people would often like to do.

Picture for an example of what I'd like to do, if the player touches the event one thing happens but if the event touches the player then something different happens.
It seems to be a difficult thing, maybe you need to create a system using the coordinates and the direction the enemy is looking.

If the enemy is looking up and his Y coordinate is greater than the player's, he takes damage. Of course you will have to do this for all other directions conditions:

RMVX-ABS-Zumbi.png


I imagine it's something like this (I wrote it in notepad):

Common event (Process Parallel):
Code:
@>Variable: X-Player
@>Variable: Y-Player

In map:
Enemy event (Touch event):
Code:
@>Variable: X-This Event
@>Variable: Y-This Event
@>Conditional Branch: This event Face-UP
   @>Condition: Var [Y-Enemy] > Var [Y-Player]
      @>Player take damage
      @>
   : End
   @>Condition: Var [Y-Enemy] <= Var [Y-Player]
      @>Enemy take damage
      @>
   : End
   @>
: End
@>Conditional Branch: This event Face-Down
   @>Condition: Var [Y-Enemy] < Var [Y-Player]
      @>Player take damage
      @>
   : End
   @>Condition: Var [Y-Enemy] >= Var [Y-Player]
      @>Enemy take damage
      @>
   : End
   @>
: End

@>Conditional Branch: This event Face-Left
   @>Condition: Var [X-Enemy] > Var [X-Player]
      @>Player take damage
      @>
   : End
   @>Condition: Var [X-Enemy] <= Var [X-Player]
      @>Enemy take damage
      @>
   : End
   @>
: End
@>Conditional Branch: This event Face-Right
   @>Condition: Var [X-Enemy] < Var [X-Player]
      @>Player take damage
      @>
   : End
   @>Condition: Var [X-Enemy] >= Var [X-Player]
      @>Enemy take damage
      @>
   : End
   @>
: End
@>

As the event is activated only by touch, this means that you will not need to create 2 variables for coordinates by events, you can use the same ones, just copy the event several times on the same map and just replace the graph and speed as you prefer.

I haven't tested it and I don't guarantee that it will work as you expect since I don't know if it's really for this mechanic that you need it.
I'm not going to commit to creating a demo because of the high chance it won't be used, so I'd rather just teach the methods and I wish you the best of luck.
I think I managed to partially (or fully?) implement this interaction via script.
Contact me via DM if interested.
Please disregard my previous idea.
This idea will not work, considering that practically in all versions of RPG Maker the map events turn to the player before passing the event, that is, the player will always take damage.
"Player touch" = Player can run at event and activate it but event cant activate when running into player.

"Event touch" = Player can run at event and activate it, event can run at player and activate itself.

Because of that i believe your approach will not work and can not work.
Depending on the details iam sure there are alternatives.

Original thread: https://forums.rpgmakerweb.com/threads/event-touch-player-touch-event.154094/