# Mimicking Overwatch health bar system

**URL:** <https://forums.unrealengine.com/t/mimicking-overwatch-health-bar-system/409084>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, Blueprint, question\
**Created:** [November 8, 2017, 5:21pm UTC](https://forums.unrealengine.com/t/mimicking-overwatch-health-bar-system/409084 "2017-11-08T17:21:08Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 11, 2017, 11:03am UTC](https://forums.unrealengine.com/t/mimicking-overwatch-health-bar-system/409084/10 "2017-11-11T11:03:02Z")

</div>

I know for a fact that the PreConstruct event is buggy and does not always update widgets correctly -  
you can force it by clicking Auto-Fill buttons of the specific elements. Anyway, I never tested it during run-time. Having done that now, I can see it does not update correctly, indeed.

I made adjustments to the blueprint:

 ![219796-grapsh1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/9/1890b580fa665c79320dc3fa8f6d21721ac172a3.png)

Handled the 0 division, ensured that the fill struct is pushed in correctly into the slate child slot, added a couple of events so the functionality is easily reusable.

* * *

Also added a _SetHAS_ CustomEvent you can use for setting (and resetting) the initial values dynamically:

 ![219797-graph2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/e/d2e61256aaa6f80c0d0b799990e6cbfd2ab27bb7.jpeg)

And a button that triggers it, now it updates fine in game, too:

[![https://gyazo.com/02a098513424d30025ef15cad267a0db](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/4/1/e415e1bf84f592ef894021f0f71a416d479e85d4.gif)](https://gyazo.com/02a098513424d30025ef15cad267a0db)

---

_[View the full topic](https://forums.unrealengine.com/t/mimicking-overwatch-health-bar-system/409084)._
