How do you make a health bar? I would like to learn how you can make a health bar. If you could tell me it would be very helpful. Thanks!
Offline
I made one here
Here's the .sprite file: http://www.mediafire.com/?k2y28dvt8668baa
To use: Change the slider for health (%)
If you use this, give credit if you like
Last edited by Sidharth (2011-07-31 13:31:34)
Offline
That's easy. Make different costumes for when the health bar gets lower and lower health. So, the script might go like this, so for the bad guy, put in a script that says if touching player and attacking equals 2 (For kick. 1 for punch, probably), change health by (Whatever you want). Broadcast (Whatever you want). And for the health bar, put when i receive (Broadcast earlier) change costume # by (-1 or +1, depending on if your full health bar is top costume or bottom). Remember to put all the forms of the health bar and costumes in the right order.
Hope this helped.
Offline
frizzlepuss893 wrote:
That's easy. Make different costumes for when the health bar gets lower and lower health. So, the script might go like this, so for the bad guy, put in a script that says if touching player and attacking equals 2 (For kick. 1 for punch, probably), change health by (Whatever you want). Broadcast (Whatever you want). And for the health bar, put when i receive (Broadcast earlier) change costume # by (-1 or +1, depending on if your full health bar is top costume or bottom). Remember to put all the forms of the health bar and costumes in the right order.
Hope this helped.
I found a more accurate way already
Offline