YEP_EventChasePlayer

Hello, guys. I have been using YEP_EventChasePlayer plugins and this plugin show the implementation of Line Of Sight algorithm but there is one problem. The enemy can't detect obstacle, they still can chase us even if we are behind the wall which is not supposed to work like that.

Can someone help me to add some javascript code into the YEP_EventChasePlayer to make the enemy can identify the wall or obstacle and don't chasing us after we hide behind the wall or obstacle ?

I would be very very thank you 🙂
you'll need a pathfinding plugin to give you that option in the move route.

even with that it will be a bit tricky depending on where on your map the path between event and player is.
you'll need a pathfinding plugin to give you that option in the move route.

even with that it will be a bit tricky depending on where on your map the path between event and player is.
well the YEP_EventChasePlayer have pathfinding and its fine there is no problem on pathfinding plugin. The problem is the line of sight algorithm.
you mean that the event can't "see" through walls and doesn't start chasing if there is a wall between even if the player is within range?

That is a lot more problematic and at the moment I don't think that a solution exists.

The problem is that the engine has no values to determine a line of sight. Using passability would mean that even a glass window would block line of sight.
And there is no other value the engine could use to determine line of sight directly.
That's why I use GALV_EventDetectors instead, which supports LoS. I remember you started a thread regarding that plugin, so I'm guessing you've tried it. Anyway, both plugins have something that the other lacks. In a perfect world, there would be a plugin that combined the features of both, but unfortunately, that simply doesn't exist atm.
That's why I use GALV_EventDetectors instead, which supports LoS. I remember you started a thread regarding that plugin, so I'm guessing you've tried it. Anyway, both plugins have something that the other lacks. In a perfect world, there would be a plugin that combined the features of both, but unfortunately, that simply doesn't exist atm.
i have using that plugin but it run weird. The enemy cant chasing me diagonally when i combine with galv diagonal movement or VE_Diagonal movement.

you mean that the event can't "see" through walls and doesn't start chasing if there is a wall between even if the player is within range?

That is a lot more problematic and at the moment I don't think that a solution exists.

The problem is that the engine has no values to determine a line of sight. Using passability would mean that even a glass window would block line of sight.
And there is no other value the engine could use to determine line of sight directly.
oh okey i am starting to understand

you'll need a pathfinding plugin to give you that option in the move route.

even with that it will be a bit tricky depending on where on your map the path between event and player is.
the yanfly chase player itself has pathfinding program on it. The problem is only line of sight. I hope somebody can combine YEP_EventChasePlayer with Galv_EventDetector that can make the Pathfinding A* and Line Of Sight algoritm work perfectly and work with diagonal movement.

Original thread: https://forums.rpgmakerweb.com/threads/yep_eventchaseplayer.149336/