Home / Guides / Health and Stamina in Unreal Engine: Components, Regeneration and HUD

Health and Stamina in Unreal Engine: Components, Regeneration and HUD

Health and stamina are the same problem twice: a clamped value, a few rules about when it changes, and a UI that reacts. Build it once as a component and reuse it everywhere.

1. One component, many owners

Create an Actor Component that holds current and max values and exposes functions to change them. Add it to the player, enemies or destructible props. The owner never edits the numbers directly, which keeps the rules in one place.

2. Use the engine's damage events

Unreal already has Apply Damage and the On Take Any Damage event. Route those into your component so weapons, traps and explosions do not need to know how health works. Add a damage type or tag if you need resistances.

3. Broadcast changes

Expose event dispatchers such as On Health Changed and On Died. The HUD, a damage vignette, hit sounds and animations all subscribe to them. Nothing polls the value each frame.

4. Regeneration with a delay

Do not regenerate in Tick. Use a timer that starts after a short delay following the last drain, then adds a fixed amount per tick of the timer. Cancel it when the value drops again.

5. Handle exhaustion on purpose

When stamina hits zero, do not let the player sprint again the moment it ticks back to 1. Either block sprinting until stamina refills past a threshold, or add a short recovery lock. This small rule removes the stuttering "sprint, stop, sprint" behaviour.

6. Bind the UI to the component

The bar widget gets the component once, reads the current ratio, then updates on the dispatcher. A short interpolation on the bar makes changes readable without adding any gameplay logic to the widget.

7. Multiplayer

Only the server changes health. Replicate the current value with a RepNotify and run cosmetic effects in the notify so every client sees them. Predict stamina locally only if you need very responsive sprinting, and let the server correct it.

Common mistakes

Want a working base?

If you would rather start from a finished setup, look at the related products below and check each listing for what it includes.

Related products

Tools that apply this

Need this built for your project?

I take on custom Unreal Engine, Unity and Blender work.

Request custom work