GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Change scene when lives run out

ExploboomExploboom Posts: 8Member
edited November -1 in Working with GS (Mac)
I am trying to make the scene change to the game over scene when the player runs out of lives. any help would be great thanks!

Comments

  • SDMGSDMG Posts: 280Member
    Hi Exploboom,

    First i would create a global variable called "lives".
    Second create an actor with the following rule:

    If attribute changes: game.lives is less than 1 ---> change scene.

    You have to place the actor in your scene... invisible or outside the camerview...
    and don't forget to give your lives-variable a starting value greater than 0.

    So when your player collides with an enemie you simply set

    game.lives = game.lives -1

    and when your live is 0 the scene should change...

    Hope this helps

    SDMG
This discussion has been closed.