When everything is gone, then spawn next level button

Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
edited November -1 in Working with GS (Mac)
Hey guys,

In a game i'm working on, I want it so that when everything that can be destroyed is destroyed, then the next level spawn button appears.

There are only certain things that can be destroyed, though. So i want it when all those are gone, then you may move on to the next level.

Any idea on how to do this?

Thanks!

Comments

  • WeswogWeswog Member Posts: 1,171
    You make destroyed say destroyed.game-1 when the actors that are destroyed get destroyed
    when destroyed=0 change attribute spawnbutton to true then when the person presses any button change the spawn button to false
    then in the spawn button actor when spawnbutton=1 spawn actor button then in the next scene make the destroyed attribute value to whatever the amount of things need to be destroyed in that specific scene

    EDIT: Tshirt beat me :( haha

    Cheers, Weswog
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    @Tshirtbooth

    That works! Thanks!

    But i've seen your Zombie Drop game, you tried to get the zombie on the platform then when everything is gone, you can go ahead with the next level.
    How did you do that.

    Just wondering for future references :)
  • youngster9youngster9 Member Posts: 326
    I don't know exactly how tshirtbooth did it but he might have had an attribute for each level and then when a block was destroyed it would subtract one from that attribute then when that attribute his 0 the next level button will come in.

    tshirtbooth probably did it a cooler and faster way.
  • WeswogWeswog Member Posts: 1,171
    Ok I see what your doing well you need an actor/ hero/lander then in your actor that lands create this

    If hero overlaps or collides when destroyed=0
    Timer after 3 sec. or whatever time change attribute finished level to 2

    Cheers, Weswog
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Okay that works.

    But now when i go to the next level, it doesnt work cause it is set to 2. (just a example)
    But level 2 has 3. So how do i do that?
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    When i say 'it' I mean the integer attribute.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bump.

    Just to recap, i got it working.

    But now when i go to the next level, it (the integer) doesnt work cause it is set to 2. (just a example)
    But level 2 has 3 things that can be destroyed. So how do i do that?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    you'll need a separate attribute for each level. Or when you switch the level you can change the attribute you have to the updated destroy amount for the next level. Whatever is easier for you
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    I dont understand.

    When i go to the next level, i update the attribute, it will work, but then lvl 1 wont work ;)
    And i tried a separate attribute, but where would i put the change attribute that Tshirtbooth showed how to do? I already have one in the actor for lvl 1.

    Thanks
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bumping
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bumping again.
Sign In or Register to comment.