Life force ends reset game

ninja23666ninja23666 Member Posts: 7
edited November -1 in Working with GS (Mac)
I want to tell my game that when the life force is gone to end the game and put it on a different screen?

Comments

  • BrynjeBamsenBrynjeBamsen Member Posts: 188
    Game.life = 0
    change scene
  • ninja23666ninja23666 Member Posts: 7
    ok but what do i use to tell it to do that
  • BrynjeBamsenBrynjeBamsen Member Posts: 188
    you might have to elaborate if you want an exact solution.

    but here goes nothing :)

    Create a integer game attribute called life Set it what ever you want life force to be.

    now this is where you have to be more specific. How would you like to reduce your life force. By time, By damage, etc etc etc...

    f.ex If player collides or overlaps with enemy

    Change attribute game.life to game.life -1

    Then make another rule saying
    IF game.life = 0

    Change scene

    Cant really help until you specify your thoughts a bit more
Sign In or Register to comment.