i plan on creating hordes/groups of zombies that will converge on a player/players during rounds, there’s one issue however; the AIs will often pick the same targets since the script processes each possible target and picks the closest one, and this causes the AIs to crowd together, which i dont want.
video examples
one player:
multiple players:
as you can see, the bunching can get extreme if all the zombies pick one target, however it starts to lessen as they kill the human and move to other players.
so, are there any ways i can prevent this ai bunching?
You could create a path for 1, get all the waypoints, and place some invisible blocks there to prevent other characters from attempting to go there. and then do that for every NPC. This should stop other npc’s from following the same path as others.
It sounds like you’d be interested in implementing a “boid” algorithm, it’s pretty neat but will have to be modified to suit your needs of course. I’d start here to understand what it is: Boids - Wikipedia
I can’t provide an implementation myself but I did find this video just from googling, perhaps you can start with something like this before building your own solution. https://www.youtube.com/watch?v=Aqss0XUeWfk