Health Bar
Hi!
I try to make my own Health Bar. I use a text box for the health bar and a timeline. But when the health bar reach zero, there is a little bit left of the health bar. Is there a way to make the whole health Bar to disappear when it reach zero?
-
You can do this easily with 2 things: a keyframe and a calculator gadget. First, place the keyframe down, then open the text box you're using for health and turn it off. Exit the keyframe edit mode.
Next use the calculator gadget with the = setting, with a value of 0. Wire the output from whatever logic you're using for health into the calculator. Finally, take the output from the calculator and use it to power the keyframe. -
Sorry, I forgot, you need to have a NOT gadget after the calculator :)
-
Alternatively, you could set the calculator to 'greater than' 0, this symbol: >
-
Thanks for the answer. For now, I just used another text box with the same color as the UI background, black, to cover the last piece of the health bar.
But I have a worst issue than that. I use a value slider to set the min and max health. And I use a counter to count down the health, that works fine if I set the max and the current value right into the counter, but not if I wire the max and the current value from the value slider into the counter.
I just wonder how I can set this up properly and also set the health back to maximum when the player dies?
댓글을 남기려면 로그인하세요.