How to spawn multiple actors
djtackl
Member Posts: 10
I need my game to spawn multiple actors in a short period of time.
Problem:
The spawner only spawns one enemy no matter what amount it's told to spawn.
Rules:
I have a gameEngine actor that controls the wave time and enemy amount.
----- If gameState = 2 then (gameState 2 = wave in progress)
---------- if enemiesSpawned >= enemiesThisWave then
--------------- Spawn Actor: enemy | In direction: random(0,359) | at (0,0) relative to: actor
--------------- Change attribute enemiesSpawned to enemiesSpawned+1
Shouldn't that loop until all the enemies are spawned?
Comments
The change attribute will only fire once. Use a loop behavior inside the rule instead of another rule.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
What is the loop behavior called? I don't have a behavior called "loop"
Are you on windows?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Yes. I got it to work anyway. I just used a timer to repeat every 0.025 seconds while the value is true. Thanks for the answers.
Ah I guess Windows doesn't have the loop behavior.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
They do have it, underneath the group behaviors