Upgrading a player's health?
I've seen similar questions, but nothing that really helps currently.
Right now, I have a normal health bar, but I want a player to be able to add health to his health bar when certain items are found and picked up.
What is the easiest way to do this, anyone know?
Thanks guys!
Right now, I have a normal health bar, but I want a player to be able to add health to his health bar when certain items are found and picked up.
What is the easiest way to do this, anyone know?
Thanks guys!
Comments
In one of the objects you pick up add this to the rule in the item.
Rule
When overlaps and collides with (main actor)
Change attribute player.health to player.health+20
The last number can be any amount you want.
So currently when the character collides with something, it loses health, and when it touches a health pack, it gains that health back, which is perfect.
However, now should it collect a health back when it's at full health, if it gets hit again the health bar doesn't change unless it gets hit ANOTHER time. Almost like it has a hidden extra 10 health.
Is there any way to max out the characters health at a certain point, so no matter how much health it collects, it will top out at a certain point?
[When overlaps or collides with health pack AND health is < 91]-> add 10.
Since you weren't telling the health bar to stop at 100 it was going to 110 when collecting a health pack at 100.