Hi, I am trying to use the plugin,
YEP_EventChasePlayer, to be able to chase the player at LOS proximity. When the Event touches the player, it initiates a battle sequence. When the player chooses ESCAPE, it will pause the Event, allowing the player to have time to get out of sight. When the player is out of the Event's chase range, the Event will go back to its original position by calling Yanfly's
$gameMap._events[this.eventId].startReturnPhase() via script command.
Handling Chase sequence:

Handling Battle sequence after escaping:

Now, this only works if I am using a single Event page. But, when I try to use multiple pages, it no longer put the event back to it's original position.
I am super new to writing codes, but I tried to do a bit of google to understand simple things. And I realized the variables
$gameMap._events[this.eventId]._startLocationX and
$gameMap._events[this.eventId]._startLocationY gets updated every time the Event switch pages, at least that is what the console log is showing. These two variables are being use by
startReturnPhase(). For some reason every time the Event switch pages, it updates the location to where the Event is now after the chase sequence happen instead of just leaving it a lone. I am not sure what I'm doing at the moment, but I thought adjusting the code to something like this would work:

but it does not seem to. Any help would be appreciated.