Health System Component
This page aims to explain the technical details of the Health System Component. Here, you will find tables showing the available properties and functions for this component.
Overview
The Health System Component contains five properties, six functions and two event dispatchers. This section of the page contains detailed information about each of these elements, presented in tables for easier understanding.
Properties
The health system comes with a selection of properties that are used throughout the system. Below, you will find a table containing all the properties and some general information.
Health
The exposed editor setting used to define the starting health.
Auto Destroy
This defines whether the actor should be destroyed when the owner dies.
Maximal Health
This stores the maximum health limit. This is set based on the initial health when the component is first set up.
Current Health
The current state of the healthcare system.
Cached State
This is the current state of the health system. This is used to check whether the state has changed when health is manipulated.
Functions
The Health System Component comes with a range of public and private functions that can be used to access or modify health data. Below, you will find a table containing details of all the systems functions and some general information.
Get Health
Getter function to safely access the current health value.
Get Health Percentage
Use the getter function to safely access the health value as a percentage, clamped between 0 and 1.
Get Health State
Getter function to safely access the current state of the health system.
Damage
Function to apply damage to the health system.
Heal
Function to apply heal / health to the health system.
Destroy Owner
Destroys the owner once they die. This can be toggled via the 'Auto Destroy' property.
Event Dispatcher
The Health System Component comes with event dispatchers that allow you to monitor important changes within the system without having to check the code yourself. See the table below for a list of all the included event dispatchers and some general information.
On Value Changed
Called when the value stored in the health system component has been changed.
On State Changed
Called when the state has been changed.
Last updated