Game Over Woes

svnsvn Member Posts: 445
edited November -1 in Working with GS (Mac)
I created an attribute for my Player 1 actor called self.lives(you can guess what it means), and I created a rule that when the player hits an invisible barrier, he/she loses a life and the scene resets,(the rule being: Attribute Self.Lives=Self.Lives-1 when Player 1 collides with Barrier) . Now, I'm trying to create a rule that when the player loses three lives, he/she will get a Game Over screen. But I don't know how to create that rule. Can anyone help me?

Comments

  • steve86steve86 Member Posts: 806
    just make a rule when Lives = 0 change the scene to the game over scene
  • magic101himagic101hi Member Posts: 713
    First off set 'self.lives' to 3 and create a new attribute 'game.display-gameover'

    Then create this rule

    when attribute 'self.lives' is =or<than 0 then

    Change attribute 'game.display-gameover' to true

    ------Otherwise---------
    change attribute 'game.display-gameover' to false

    Hope I helped

    -Josh
  • svnsvn Member Posts: 445
    Is the 'game.display-gameover' Attribute a Boolean? And where should I create the Attribute? In my Player 1 Actor or the Scene?
  • magic101himagic101hi Member Posts: 713
    svn said:
    Is the 'game.display-gameover' Attribute a Boolean?

    Yes

    -Josh
Sign In or Register to comment.