Different effects for whether the event is facing toward or away

Alright, how to phrase this...?

Is there a way to set it up so you get different effects depending on whether an event is facing the player or away from the player? The events will be mobile so I can't use the actor's facing up, down, left, or right to do this.

I mean... if the event is facing away from the player when it gets interacted with the event gets "destroyed" and changes to a pile of debris but if it is facing the player and touches the player the player gets killed instead.

I'm sorry, but I don't have an event window to show right now because I don't even have an idea where to start in setting this up.
you can compare event position to player position to determine where the player stands, then compare that to the event's facing.

However, you can't check the event's current facing (unless it's direction fixed), because it will turn toward the player on action button. That means you have to either set the event's fixed facing in the directional conditional branch, or (if the event is not direction-fixed but turning by parallel process or moveroute) store the last facing in a variable and compare the player position to that.
Basically the event is restricted to following hallways and only has certain points it can turn around at. It tries to catch you but can only move forward unless at one of those points.
that will result in a bit of more complex coding, because you have to use event touch as a trigger, and then use the player position to check wether the player touch is from beyond - all the while using different code for movement decisions.

Please check Tsukihime's blog for event scripts - if I remember correctly, she has one script that allows an event to process a parallel page at the same time than a regular event page. This would probably be the easiest way to make the event, because if you have to do the contact checks in the same event page as the parallel movement, then that page is going to be really tricky to write...
Lol, just got a reply a short while ago from her on the http://www.RPGMakerVXAce.net forums! Talk about timing!
you can compare event position to player position to determine where the player stands, then compare that to the event's facing.
I simplified the problem to assuming the event will be adjacent to the player.


This allows me to simply check directions.


Different story if you can trigger events from several tiles away (for example, diagonally)
No, vertical and horizontal only...

If you are to either side of the event it notices you and turns towards you, otherwise it runs in straight lines. Hit it from behind to destroy it, it touches you otherwise and you die.

Sorry, my cousin's cat just died right in front of me and there was nothing I could do... I just finished getting him ready for my uncle to bury when he gets home...

Original thread: https://forums.rpgmakerweb.com/threads/different-effects-for-whether-the-event-is-facing-toward-or-away.18682/