PDA

View Full Version : Spawning waves of enemies



SamKablam
12-09-2009, 05:19 PM
I'm making a single player-style level where the player faces off against wave after wave of enemies. The level starts spawning one enemy, then increases as the player kills more and more waves. Here is what it looks like so far:

http://img193.imageshack.us/img193/9458/imagepreviewa.jpg

Basically, the Actor Factory creates a certain number of bots. The bots that spawn are added to an ObjectList. When they are killed, they are removed from the list, and the list checks to see how large it is. If the list is equal to 0 (all of the spawned enemies are dead), it increase the amount of enemies to spawn by 1 and respawns them again.

It kind of works, but I don't think it detects things correctly because sometimes the number of enemies that spawn in the next wave jumps. Any suggestions as to how to fix this? I think it may have to deal with removing a killed bot from the object list. I feel that I'm not doing it correctly.

MaximilianPs
01-10-2010, 10:32 AM
That's really interesting... but actually i didn't understand which parameter to use in Actor Factory to spawn UTBots