Reset Event From Chasing You

Hello All

I am fairly new to rpgmaker and was curious. I am using a proximity script to have enemies who are within so many tiles of you see you and chase you. However I want to be able to elude them by hiding or exiting the area. However if I leave the area and come back they automatically just run towards the player from where ever they are.

Is there a way to reset them to their current move routes and not to just run towards straight at the player the moment the player comes back to that map?

Thanks for any help on this.
that depends on how they were set to approach - please give a link to the script you're using and screenshots of the event.

Usually that is controlled by multiple pages and self-switches or switches, so you only need to reset the switches to get the events back to their static pages to stop the chase.
I am using this Proximity Detection Script here

http://www.rpgmakercentral.com/topic/3230-proximity-events/

Example of it on a NPC in my game, trying to reset it back from self switch A to it's default if you leave the area and go to another map.

Proximity%20Script%201_zpsqq08a5nk.png


Proximity%20script%202_zpsrks7y79s.png
make a fourth page, conditioned to a new switch "reset".
Place that page on parallel process and have it contain only commands to reset the switches of that specific event.

Then make a new map event that is also on parallel process. That new event should contain four commands only:
control swtich reset on (to force all other events on their reset pages), wait 3 frames (to give them time to change their switches), control switch reset off (to let them really reset, otherwise they would stay on the reset page) and then erase event (so that it will be back on next entry to the map.

You might need to experiment a bit with the wait number and how the reset-pages need to be done, but that is one way to handle it.
That did the trick. Thank you 🙂

Original thread: https://forums.rpgmakerweb.com/threads/reset-event-from-chasing-you.77967/