# Health loss bp

**URL:** <https://forums.unrealengine.com/t/health-loss-bp/2184645>\
**Category:** Blueprint\
**Tags:** health-bar, unreal-engine, please-help-me\
**Created:** [December 8, 2024, 5:51pm UTC](https://forums.unrealengine.com/t/health-loss-bp/2184645 "2024-12-08T17:51:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SmartFridge369](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SmartFridge369](https://forums.unrealengine.com/u/SmartFridge369)\
**Post date:** [December 8, 2024, 5:51pm UTC](https://forums.unrealengine.com/t/health-loss-bp/2184645/1 "2024-12-08T17:51:41Z")

</div>

I have a ghost that tracks the player. I also put a collision sphere on it and I want it to affect a progress bar in my widget. I want the health loss to be gradual

---

<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:** [December 8, 2024, 6:37pm UTC](https://forums.unrealengine.com/t/health-loss-bp/2184645/2 "2024-12-08T18:37:08Z")

</div>

- player `Begin Overlap` → `Cast to` Ghost → open `Gate` → lose health → Update UI
- player `Ens Overlap` `Cast to` Ghost → close `Gate`

---

<div class="post-metadata">

**Author:** ![SmartFridge369](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SmartFridge369](https://forums.unrealengine.com/u/SmartFridge369)\
**Post date:** [December 8, 2024, 7:43pm UTC](https://forums.unrealengine.com/t/health-loss-bp/2184645/3 "2024-12-08T19:43:59Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/b/09b0d7edb3683ec8acd29bf2f31e33e21e2ca25b.png)  
I’m not really sure what you mean. Can you elaborate

---

<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:** [December 9, 2024, 8:14am UTC](https://forums.unrealengine.com/t/health-loss-bp/2184645/4 "2024-12-09T08:14:18Z")

</div>

- connect Other Actor to Object
- successful cast → Open Gate (instead of Enter)
- connect Tick to Gate Enter
- on Gate Exit:
  - call a function that reduces player health
  - call a function that updates the UI using the reduced health value

You will need to create those functions first. A boolean variable does not help much here.
