Health bar help...
Hi
I have two health bars on screen a player and enemy. If either get hit the health bar reduces but I can't get the health bar to reduce from right to left.
My health bars are placed on the top left hand corner.
Looking for a better functioning health bar.
Is there a way to accomplish this? Possibly without constrains.
I have watched @tshirtbooths video on creating an health bar.
Thanks all
I have two health bars on screen a player and enemy. If either get hit the health bar reduces but I can't get the health bar to reduce from right to left.
My health bars are placed on the top left hand corner.
Looking for a better functioning health bar.
Is there a way to accomplish this? Possibly without constrains.
I have watched @tshirtbooths video on creating an health bar.
Thanks all
Answers
contrain attribute self.positionX
then say , how many pixels you from the side of the scene
lets say 30 pixels from the right
so you health bar will go from right to left.
so you have the constrain attribute - self.positionX
to
30-(self.size.width/2)
instead of a "plus"(+) use a "minus" (-)
I think that is how you do it, not 100% sure.
don't think it's possible without constrains