BPAC_LPSP_Health
Introduction
The Health Component (BPAC_LPSP_Health) allows any actor to keep track of its own health, whether it is alive or dead, and to act based on that information. This component also destroys the actor upon death and fires a few events to notify the game of its death. Every damageable actor in the asset has a Health Component attached to it, which gets notified whenever that actor receives damage. It promptly keeps track of the damage and applies it in whatever visual form is needed. In special cases, the component will call a dispatcher that the owner can subscribe to and run its own code when damaged or killed.
If you seek to access the BPAC_LPSP_Health, it is conveniently located at the following path: InfimaGames/LowPolyShooterPack/Core/Health/BPAC_LPSP_Health.
Editable Variables
Max Health:
This value represents the actor's maximum health.
Actor Destroy Delay:
This refers to the amount of time that passes after the actor's health runs out, after which it is destroyed.
Receive Damage Point:
If true, the actor can receive point damage.
Death Delay Point:
This value represents the delay after which the owner's health runs out and we will completely destroy the actor.
Receive Damage Radial:
If true, the actor can receive radial damage.
Death Delay Radial:
This value represents the delay after which the owner's health runs out and we will completely destroy the actor.
Regenerates Health:
This variable determines whether this component will restore health over time after the last hit, or whether it will remain permanently lowered.
Health Regen Delay:
This variable determines the time it takes (after the last hit) for the component to start regenerating the owner's health.
Health Regen Speed:
This variable determines how fast health regenerates.
Health Regen Amount:
This variable determines the amount of health to regenerate every tick (per speed) of the regeneration timer.
Disable Collision Between Pawn And Ragdolls:
If this actor is a character and this setting is enabled, collisions with other characters will be disabled when the character is dead. This will prevent collision issues.
Death Sound:
Sound played when the character dies.
Bone:
This value represents the root bone from which to start the ragdolls on the specified character skeletal mesh.
Ragdoll Delay:
This value represents the time at which the ragdoll will start after the character runs out of health.
Private Variables
Alive:
This variable is set to false when the owner is dead.
Ragdoll:
This variable lets us know whether the owner is currently in a ragdoll state or not.
Damageable Type:
This variable lets us know what type of damageable the owner is.
Health:
This value represents the actor's current health status.
Health Regen Timer:
This variable holds a reference to the health regeneration timer, which helps us start or stop it.
Functions
Is Alive:
Returns true if this actor still has health left.
Receive Damage Point:
This function is called when the actor receives point damage. It is triggered through an event, but we have encapsulated its functionality here for better future replication.
Receive Damage Radial:
This function is called when the actor receives radial damage. It is triggered through an event, but we have encapsulated its functionality here for better future replication.
Can Receive Damage Point:
This function returns true if the actor is currently able to receive point damage.
Can Receive Damage Radial:
This function returns true if the actor is currently able to receive radial damage.
Set Up For Character Type:
This sets up the health component to work with a full skeletal mesh character. Doing so makes it significantly easier to handle ragdolls and other character-specific functionalities.
Get Health Percent:
Returns the percentage of health that the owning actor has remaining.
Spawn Hitmarker:
Spawns a hit marker for the character.
Last updated
Was this helpful?
