View Single Post
Old 21/09/2018, 02:14 PM   #6
NaS's Avatar
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,694
Reputation: 571
Default Re: NPC chase the nearest player

Originally Posted by matje View Post
Thanks everyone, with your help I got the NPC to recognize the closest player and chase him.
Now the issue is that the NPC's target doesn't change. They will always chase the one initial player even though other players are closer to them. I've used timer to update the closest player every half second, but the NPC does not change the target.
Could you post the related code? Otherwise we have to guess what could be the cause
NaS is offline   Reply With Quote