# Health

The health configuration is where you setup the health for your characters including links to Unity UI elements to display health during play.&#x20;

You can also manage what happens when the character's health points reaches 0 like death animations and how long before the character is disabled.&#x20;

![](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjVA6kQkWA4zV2VdmFc%2F-MjVFp_nZj_csBQNqD9H%2FHealthConfig.PNG?alt=media\&token=62d213a3-4c2f-4412-999f-5b935e1c0407)

{% hint style="info" %}
If 'Stop Movement On 0 Health' is ticked then a delegate event will also be raised when the movement is either enabled or disabled which can be connected to from any script. Information on how to do this can be found [here](../general-and-stats#hit-can-stop-movement)
{% endhint %}

## Health GUI&#x20;

Health GUI can be added which will show the Current and Max health in sliders and text. This is updated during play.

![](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjVH9S6Q7ftViUejjzR%2F-MjYdu14PoHNEiib4WOv%2FHealthBar.PNG?alt=media\&token=555b1d99-910a-49af-8d78-732a95bc93cd)

{% hint style="info" %}
Multiple sliders and text can be setup on the entity by pressing the “+ Add Health GUI” button and can be removed by clicking the “X” for each health GUI section.
{% endhint %}

Once a health GUI section is added the following settings will appear:

![](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjYnqO-ATe5wNuAePya%2F-MjYtLDLmDV-HUvLxylU%2FHealthGUI.PNG?alt=media\&token=95163212-6e5a-4839-8d7f-34c3b2ed2139)

**Health Slider**

This setting requires a Unity Slider object which can be created from the Unity menu: GameObject > UI > Slider. The slider will show the current health during play and will always make sure the max value matches the max health to accurately represent how ‘filled’ the bar should be.

If the load default icon ![Image showing the Load Default Button](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjPRj72OIJdbRL9FGPC%2F-MjV2j6coFkqZApYLdbD%2FLoadDefault.png?alt=media\&token=f8e7ba6c-a822-4434-b053-3aefa6e02bf5) is clicked then the ABC\_GUI default prefab will be added to the Hierarchy and the "sliderHealth" object will be added to the setting. This example can be used, referenced or edited.

**Health Over Time Slider**

This setting requires a Unity Slider object which can be created from the Unity menu: GameObject > UI > Slider. This slider unlike the Health Slider will update over a duration after a delay every time the health is reduced for an impactful effect. This can be used for example to add a background colour which depletes slower than the normal Health Slider (which is instant) showing how much damage the entity has just received.

![](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjVH9S6Q7ftViUejjzR%2F-MjYgE2ZBq0fmnR_fZuQ%2FHealthOverTime.PNG?alt=media\&token=960796e8-db55-47e8-be74-eb13f97993fc)

If the load default icon ![Image showing the Load Default Button](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjPRj72OIJdbRL9FGPC%2F-MjV2j6coFkqZApYLdbD%2FLoadDefault.png?alt=media\&token=f8e7ba6c-a822-4434-b053-3aefa6e02bf5) is clicked then the ABC\_GUI default prefab will be added to the Hierarchy and the "sliderHealthOverTime" object will be added to the setting. This example can be used, referenced or edited.

If an object is placed in the Health Over Time Slider then the “Update Over Time Delay” and “Update Over Time Duration” can be configured adjusting how fast the over time slider reduces its fill after a set delay.

**Only Show Sliders When Selected**

If enabled then the sliders setup in this section will only show whilst the entity is being targeted by another ABC entity. If disabled then the sliders will always show.

**Health Text**

This setting which requires a Unity text object which can be created from the Unity menu: GameObject > UI > Text. This object can be placed anywhere on the screen and will display the current health and the max health in the following format: CurrentHealth/MaxHealth\
If the load default icon ​![Image showing the Load Default Button](https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjPRj72OIJdbRL9FGPC%2F-MjV2j6coFkqZApYLdbD%2FLoadDefault.png?alt=media\&token=f8e7ba6c-a822-4434-b053-3aefa6e02bf5) is clicked then the ABC\_GUI default prefab will be added to the Hierarchy and the "txtHealthValue" object will be added to the setting. This example can be used, referenced or edited.

**Only Show Text When Selected**

If enabled then the text object setup in this section will only show whilst the entity is being targeted by another ABC entity. If disabled then the text will always show.

## Notable Settings

|          **Setting**                | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| :---------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|            **Max Health**           | This setting configures the max health the entity can have. This accepts float values but will always be rounded to display a whole number in any game UI setup. The max health can be changed during play from ability effects.                                                                                                                                                                                                                                                                                                                                                |
|          **Current Health**         | Setting displays the current health of the entity, this will never go below 0 or higher then the max health. This value will change during play if the current health is adjusted due to an attack.                                                                                                                                                                                                                                                                                                                                                                             |
|         **Regen Per Second**        | This setting determines how much health is recovered every second. This accepts floats values. If 0 then no health is recovered.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|      **Full Health On Enable**      | If ticked then the entities current health will always be full to the max whenever the object is enabled during play. Useful for objects that ‘respawn’.                                                                                                                                                                                                                                                                                                                                                                                                                        |
|       **Disable On 0 Health**       | If enabled then the entity object will be disabled after a delay. If ticked then a box will appear to enter the delay amount                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|          **Animation Clip**         | <p>Configuration can be setup to play an animation once the entities health reaches 0 health.</p><p></p><p>Animation Clips defined will play on ABC's own Animation Runner system which means you can set to run animations without using Unity's Animator. </p><p></p><p>To determine which animation to play simply select or drag and drop an Animation Clip into the setting then set up the duration, speed and delay </p>                                                                                                                                                 |
|       **Animation Parameter**       | <p>The animation parameter system links directly into the Unity animation controller attached to the entity and is required for the animations to activate. <br><br>To determine which animation to play the “Animation Parameter” which has been setup in Unity needs to be written in the parameter config box, then the matching parameter type needs to be selected from the drop down. </p><p></p><p>For example if Float parameter has been setup in Unity then the 'Float' option needs to be selected and float values need to be entered in the on and off button.</p> |
| **Show Image On Health Reduction**  | If enabled then an image can be setup which will show every time the entities health is reduced. An example of its use would be to show a blood splatter overlay every time the entity gets attacked.                                                                                                                                                                                                                                                                                                                                                                           |

{% hint style="warning" %}
It is highly recommended to read the tooltips in the blue boxes for a full description on what each setting does&#x20;
{% endhint %}
