The Add to Health Bar behavior will increase your health bar by adding a value to the current percentage. You can also use negative numbers to decrease the health bar.
The health bar is capped to 100%. Adding more after 100% will not have any results.
This behavior will trigger an event once it has met the designed condition.
This is the health bar that will be increased or decreased. If there is a health bar in your UI layers it will automatically be selected. If you do not have a health bar make sure to add one and then select it here.
This is the amount to add to the health bar. Remember you can not exceed 100%
|Event on Full||
When this toggle switch is on, the behavior will trigger an event (the next connected behavior) once the health bar reaches 100%.
By default this toggle switch is off.
|Event on Empty||
When this toggle switch is on, the behavior will trigger an event (the next connected behavior) once the health bar reaches 0%.
By default this toggle switch is on.
|Health Bar Value||
Returns the current health bar percentage
This outputs the Object ID.
If you have a health pack item that when your player picks up (collides with), it will increase your health by 10% you can use this behavior.
Additionally, you can use this behavior when your player is being attacked and you want the health to go down. Eg. -10 will decrease the health by 10%.