|
Hey, I'm trying to stop instantiating my enemy character when the level ends which last for 4 seconds then goes to the next stage. I don't want enemies to still be attacking when the level is done. Any Help? Thanks alot, But how would i destroy the ramaining zombies that have already spawned after the instantiate function is shut off??
(comments are locked)
|
|
I think what you probably need to do here is to have a boolean variable which determines whether the game is within the 4-second "finishing" state. Then, you could replace all your
statements, with
(the ! means "not")
(comments are locked)
|
|
Considering that your code is doing the same thing over and over with just a couple of minor variations, it would be far shorter and easier to manage if you use an array and a function that takes a couple of parameters:
You can call the LevelEnd function from somewhere when the level ends, and that will make all the Respawn functions stop. Thanks alot, But how would i destroy the ramaining zombies that have already spawned after the instantiate function is shut off??
Apr 05 '10 at 02:34 AM
dreal
(comments are locked)
|
|
I think when the level finishes you should have a BroadcastMessage that disables the zombie spawner. ah now THAT'S and idea.
Apr 22 '10 at 05:34 PM
Not showing my name
(comments are locked)
|

how about making the level end when they all die?