Overview

AC_HealthComp is an Actor Component designed to manage the health system of its owning Actor (typically a character or any damageable entity). It initializes the health value, listens for damage events applied to the owner, updates the current health accordingly, and handles death logic. This component centralizes health management and provides hooks for reacting to health changes and death events.


Variables

Variable Name Type Purpose
CurrentHealth Float Tracks the current health value of the owner. It is initialized to MaxHealth and updated when damage is applied.
MaxHealth Float Defines the maximum health the owner can have. Used to initialize CurrentHealth and clamp its value.
OnHealthChanged Delegate (Event) Intended to broadcast health changes to listeners. Not currently used in the Blueprint but designed for external binding to respond to health updates.

Event Graph Breakdown

Event: Begin Play

Event: OnOwnerTakeAnyDamage (Custom Event)

Event: OwnerDeath (Custom Event)


Functions

Function: OnRep_CurrentHealth