I'm working on a top-down zombie shooter game with the following mechanics:
- Multiple zombies spawn continuously
- Zombies will patrol aimlessly until "hunt mode" is triggered
- "Hunt mode" is triggered A) when the player gets too close to a zombie or B) if a zombie finds the player's trail (which is generated behind the player as they walk in the form of invisible sprites)
- Once this mode is triggered, the zombies will continuously find a path to the player to chase them down
All of these mechanics are working properly - but only with one zombie. What I want to accomplish is to have multiple zombies, each one with their own instance of the pathfinding behavior so that each one can chase the player independently. As it is now, once one zombie's "hunt mode" is triggered, they all are - even though "hunt mode" is an instance variable. I've looked through the pathfinding tutorials, done a fair bit of Googling, and tried all kinds of tricks with For Each and Families, but have yet to find anything that works. Any ideas? I've attached my .capx for reference. Link
Thanks!