Health bar growing too long!

tcla75tcla75 Member Posts: 71
edited November -1 in Working with GS (Mac)
So I saw this post from a year ago in this forum and I was having the same problem. I have a star falling to the ground and have it set to destroy when it hits the actor but add +2 to the health. The answer that works for the other person who posted this question was
chage attribut game.health to min( game.health+20,100)

Thanks to tshirtbooth but weirdly when I did this it made the star pass through the actor and nothings happens. See below not sure what I'm doing wrong?

image

Comments

  • tcla75tcla75 Member Posts: 71
    bump
  • UtopianGamesUtopianGames Member Posts: 5,692
    I would try a simple game.health to game.health+2

    You could add another rule if game.health<100 if you don't want the bar to grow bigger than it should.

    Darren.

    image
  • tcla75tcla75 Member Posts: 71
    When you say game.health<100 my game health is 10 in the attribute so it would be <10 for me right? I tried that but its not working. Not sure if it should be followed up with another rule.

    image
  • ValanValan Member, BASIC Posts: 410
    I hope I am understanding correctly. The health bar keeps increasing?

    You can add a simple limit.
    When health > (maximum)
    Change health attribute to (maximum)

    Cheers
Sign In or Register to comment.