# How do I Make a Spawner for Enemies in my Game?

I'm making my first zombie game in the Blender Game Engine. It is a first-person-shooter style game with zombies and stuff like that.

I am having trouble making an enemy spawner for the zombies however. I got it working somewhat before but after a certain amount of time the zombies just start to stack up on top of each other because I cannot get it to only spawn the zombies at the start of the game and after one dies. I changed it up some but now they don't spawn at all.

It really would be nice to have zombies spawn randomly within a specific area of the game but far away from the player. I don't know how to code in python so I'm making my game only with logic bricks. I have an empty currently that is supposed to spawn the zombies but it doesn't work.

• making a game only with logic bricks will be quite hard and challenging. – Tooniis Jul 22 '17 at 5:53
• Luckily I've gotten pretty far over the past few days! I'm sure there's a way. I just dont know how. With a recent version I was able to get a spawner working pretty well. It would spawn a zombie if the player was far away and if there were no zombies by it. I however would prefer something that would detect if there was a max amount of zombies on screen and if not it would fill in for the extras by putting them in a random place in a set zone. If I need a script for this that's fine, as long as it's a copy/paste sort of thing. – Caden Mitchell Jul 22 '17 at 7:45
• I also think you will find a way with logic bricks but you may want to learn using scripts because they will make your work much easier. GL – Tooniis Jul 22 '17 at 7:47
• Is there a sensor to detect a max amount of objects? I would really probably only need that and it might work. – Caden Mitchell Jul 22 '17 at 7:49
• I keep getting this error in the console Warning, object "Empty.014" from AddObject actuator "Edit Object" is not in a hidden layer. even after moving that object to a hidden layer – Tooniis Jul 22 '17 at 8:40