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 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.