Help with Health Bar?

Hi, so I've set up a health bar for my game. Graphically all is working well. And when the bar depletes to 0, the scene changes to Game Over as intended. However the bar STAYS at 0 and I am unable to replay the level, it will go straight to Game Over again. How do I reset the health bar attribute to it's original state? (It's full number is 10).

Thank You.

Comments

  • DuesDues Member Posts: 1,159
    edited February 2014
    You could have an "controller actor" off screen with a rule that resets the healthbar to whatever value you want every time the scene loads.

    So basically in that actor have a rule:

    Change attribute game.healthbar to your value
  • j75j75 Member, PRO Posts: 235
    I am assuming this is all on one scene.
    so, when health bar = 0, set game.over to true, TIMER: after 1 sec, set health.attribute to 10, load play again button.
  • ReMasteredGamesReMasteredGames Member Posts: 101
    edited February 2014
    I am assuming this is all on one scene.
    so, when health bar = 0, set game.over to true, TIMER: after 1 sec, set health.attribute to 10, load play again button.
    That's what I've done, it worked! Thanks!
Sign In or Register to comment.