RPG Maker Forums

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:
1589567915062.png
Handling Battle sequence after escaping:
1589567981072.png
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:
1589568164163.png
but it does not seem to. Any help would be appreciated.

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,836
Latest member
T62352536256t362
Top