how do i make my health bar go from right to left instead of shrinking it

wendell_heather@yahoo.comwendell_heather@yahoo.com Member Posts: 36
edited October 2014 in Working with GS (Mac)

i have hearts as my health bar and i cant figure out how to keep it from just shrinking into the middle
i have it constrained right now as
max(0,min(game.health *.05,40)))
self.size.width -25

also when i click to heal the health it lets the points keep adding up so if somebody were to keep adding health it would be unlimited how do i keep the health points from going over 430

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Use the Replicate Behavior like I did in the tutorial below. Just use a Heart image instead of my 1 pixel line.

  • idk why when i follow your video my image repeats across the screen

  • it replicates the number of the health i have in the game as the image so ifmy health is 100 it replicates it 100 times i dont mind setting my health to 1 so that it only replicates the image 1 time but then i run into the problem of not being able to subract .25 because it wont read it

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    The tutorial above uses a Health Attribute that is an Integer. Integers do not allow decimal numbers.

Sign In or Register to comment.