Health
The health configuration is where you setup the health for your characters including links to Unity UI elements to display health during play.
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.
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
Health GUI
Health GUI can be added which will show the Current and Max health in sliders and text. This is updated during play.
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.
Once a health GUI section is added the following settings will appear:
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.
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.
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
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 | Configuration can be setup to play an animation once the entities health reaches 0 health. 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. 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 |
Animation Parameter | The animation parameter system links directly into the Unity animation controller attached to the entity and is required for the animations to activate. 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. 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. |
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. |
It is highly recommended to read the tooltips in the blue boxes for a full description on what each setting does
Last updated