Alright, as some of you may know I am currently developing a Zombie Survival RPG. In my game, there are Zombie NPC's shuffling around on the various maps that I will soon design and when a player is in the area, they will follow you trying to catch you. When they are successful of this, a battle will begin. When you defeat your enemies, the NPC is gone (due to the fact that you defeated it/them). What I would first like to know is how can I make it so that in my game, the zombies respawn after a certain amount of time or something like that? Maybe even after a certain amount of steps, another one will appear and walk around.
My other question is that, is it possible to make it so that the zombies won't start following the player until they get within' a reasonable distance, or the zombies physically SEE the player? This would prevent the issue of walking around on a map with lets say... 10 zombies on it and even though you are behind walls they will ALL try to get to you in one area.
Thanks for taking the time to help me solve these issues. I appreciate it!
My other question is that, is it possible to make it so that the zombies won't start following the player until they get within' a reasonable distance, or the zombies physically SEE the player? This would prevent the issue of walking around on a map with lets say... 10 zombies on it and even though you are behind walls they will ALL try to get to you in one area.
Thanks for taking the time to help me solve these issues. I appreciate it!