resetting the spawn rate after a pause

personal foulpersonal foul Member Posts: 64
edited November 2015 in Working with GS (Mac)

hello GS, with the help of @Hopscotch i was able to increase my spawn rate of enemies. after a certain amount of time the hero can't keep up killing enemies, but he has a nuke button. what i would like this nuke button to do is pause the game (i got the game to pause),destroy all enemies on screen (don't know how to do this) and return to original spawn rate (not sure how to do this either) and start the process over again till he finds another nuke button and so on.....
Any help would be appreciated. Thank You.

Comments

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956
    edited November 2015

    Make a global "nuke" integer attribute.

    When the nuke occurs change game.nuke to 1

    Tell the enemies that when game.nuke is 1 destroy self.

    when game.nuke = 1, timer, after .03 pause the game.

    Change game.nuke to 0.

    Change spawn rate to original spawn rate.

    Unpause game.

  • personal foulpersonal foul Member Posts: 64

    Thanks for taking the time to answer question. got the enemies to destroy but can't get spawner to work again. at least i'm one step closer. @RabidParrot

Sign In or Register to comment.