Posted: Thu Aug 16, 2007 5:38 pm
I havn't used this kind of health bar in a while, so I may be a little off with this explanation.
Notice how there are 3 sections of the coding. Update health bar, change health, and set health.
Updatehealthbar: doesn't do much.
changehealth: put it in script editor when you want to add or subtract health. put ChangeHealth(*) but instead of the star, put a posotive number to add that much to the healthbar, or a negative to subtract it.
Sethealth: put it in script editor when you want to set exactly how much health you want to have at the time. use SetHealth(*) but instead of the star, put the amount of health you want the actor to have.
you will also have to put stuff in like (and some1 plz correct me if I did this wrong)
put in place of the star what you want to happen when the health bar is empty
Notice how there are 3 sections of the coding. Update health bar, change health, and set health.
Updatehealthbar: doesn't do much.
changehealth: put it in script editor when you want to add or subtract health. put ChangeHealth(*) but instead of the star, put a posotive number to add that much to the healthbar, or a negative to subtract it.
Sethealth: put it in script editor when you want to set exactly how much health you want to have at the time. use SetHealth(*) but instead of the star, put the amount of health you want the actor to have.
you will also have to put stuff in like (and some1 plz correct me if I did this wrong)
- Code: Select all
if (g_PlayerHealth <= 0)
{
***
}
put in place of the star what you want to happen when the health bar is empty