16
Ask a Question / Re: show X percent of an image/actor?
« on: December 09, 2016, 09:48:19 am »
I think the easiest (and best looking) solution is to use a black colored actor on top of the health bar. Set its origin to the right and "grow" it from the right towards the left as your character's health is depleted, covering up more and more of the health bar. That way, the green disappears incrementally, you get to use your gradient, *and* you get to use easing on the black actor grow tween to make the change in health look slick and professional. All those benefits plus one more -- it's easy.
I think the only advantage that image API holds is that you could make the empty health bar space transparent.
I think the only advantage that image API holds is that you could make the empty health bar space transparent.