How do you reset a random spawner.. Read for more info

g0doneg0done Member Posts: 9
edited November -1 in Working with GS (Mac)
I have a wave defence game, the enemies are brought just off the side of the stage from using a spawner, each level has a set amount of spawns level 1 = 7 level 2 = 14 so on and so forth,

This is done by:
Attribute
Level 1 - spawnAmount 0

Actor
Change Attribute // game.Level 1 - spawnAmount to: game.Level 1 - spawnAmount+1

Spawner
Rule // game.Level 1 - spawnAmount < 7

Then to win the game I did a simple when all enemies have been killed level complete.

But after this when I try to play there level again it won't spawn any more actors to the stage and like wise if the the player triggered a game over when the level is replayed it will either only re-spawn the remaining actors or won't spawn anything again.

I have trying creating reset attributes from every tutorial I can find but nothing deals with random spawners.

I have been using a game reset in the mean time, it's just annoying as the player gets sent to the main splash screen after each level and im unable to add anything like mission complete icons ect

Comments

  • digletodigleto Member Posts: 76
    You simply have to reset the spawn amount to 0. Right now it won't spawn any more because the attribute is at 7 where you said stop spawning.
Sign In or Register to comment.