How to Make a Health System in UE5 Blueprints
Every action game needs one, and it’s the classic first Blueprint: a float that goes down when things hurt you, clamps at zero, and tells the rest of the game when you die. The design decisions are where damage comes in and who gets told about death.
What it’s made of
Variables
Health and MaxHealth as floats (100/100 is the convention), optionally a RegenRate float and a bIsDead bool so death logic can’t fire twice.
Events
Event AnyDamage is the engine’s built-in entry point — anything calling Apply Damage on the actor lands here with the amount. Add a custom Heal event and an OnDeath Event Dispatcher so UI, game mode and enemies can all react without hard references.
The logic
On AnyDamage: subtract the amount, Clamp between 0 and MaxHealth, update the health bar, then Branch on Health <= 0 — if true and not already dead, set bIsDead and call the OnDeath dispatcher. Regeneration is a looping Timer that adds RegenRate × interval while below max (and stops while dead).
Key nodes you’ll wire
The mistake that breaks it
Skipping the Clamp and the bIsDead guard: health drifts negative, and OnDeath fires once per hit on a corpse — every downstream system runs its death logic repeatedly.
New to how Blueprint systems fit together? Read the anatomy of a Blueprint system first.
Or skip the wiring — generate it
BlueprintStudio builds this system from a plain-language prompt — the right nodes, exec and data pins wired, defaults set — and tells you whether it is ready to paste or what to set up first. The prompt is prefilled:
Build “Health System” in BlueprintStudioPrompt variations to try
Paste it into your Blueprint, or apply it with the free Cosindra desktop app (Windows & macOS).
Common questions
Should health be a float or an integer in UE5?
Float. The engine’s damage pipeline is float end to end — Apply Damage sends a float and Event AnyDamage receives one — and regen ticks and percentage-based armor produce fractional values anyway. A progress bar’s Set Percent wants Health / MaxHealth as a float too. If the HUD should show whole numbers, round at display time with Floor or Format Text, never in the stored value.
How do I stop Event AnyDamage from firing after the character is dead?
The cheap guard is a Branch on bIsDead as the very first node after Event AnyDamage, so a corpse ignores incoming hits. To cut damage off at the engine level instead, call Set Can Be Damaged (false) in your death path — Apply Damage then never reaches the event at all. Re-enable it and clear bIsDead when the player respawns.
Does health replicate automatically in multiplayer?
No — Blueprint variables stay local unless marked replicated. Let the server own the number: apply damage only on the authority (guard the path with Switch Has Authority), set Health to RepNotify, and move the health-bar update into the generated OnRep_Health function so each client redraws when the value arrives. Clients never subtract health locally — they render what the server replicated.