# Heath Bar for Different limbs

**URL:** <https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [July 5, 2021, 4:28am UTC](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988 "2021-07-05T04:28:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hibs1990](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hibs1990/32/88711_2.png) [@Hibs1990](https://forums.unrealengine.com/u/Hibs1990)\
**Post date:** [July 5, 2021, 4:28am UTC](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988/1 "2021-07-05T04:28:42Z")

</div>

Hello, Does anyone know how to make a Separate health bar for legs, arms and head etc.

I have already set up damage for different body parts but now want to have different health for each part.

Any Help would be greatly appreciated. Id imagine it would be a separate health variable per body part. that’s all I can guess since I’m still trying to learn blueprints, coding.

---

<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:** [July 5, 2021, 6:44am UTC](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988/2 "2021-07-05T06:44:59Z")

</div>

Pretty much yeah, separate var for each body part.

And then either 5 progress bars. How to organize it depends on how it works and how you need it displayed.

---

<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:** [July 5, 2021, 8:49pm UTC](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988/3 "2021-07-05T20:49:50Z")

</div>

So I played with this and got here:

Found a neat way to map widgets onto the physics asset. How close is this to what you need?

---

<div class="post-metadata">

**Author:** ![Hibs1990](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hibs1990/32/88711_2.png) [@Hibs1990](https://forums.unrealengine.com/u/Hibs1990)\
**Post date:** [July 9, 2021, 12:53am UTC](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988/4 "2021-07-09T00:53:15Z")

</div>

Holy s\*\*t that is amazing!. Sorry forgot to click back on this post. How long you spend doing that?. You have skills man. I gave up couldn’t get mine working just made me too frustrated.

---

<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:** [July 9, 2021, 8:51am UTC](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988/5 "2021-07-09T08:51:37Z")

</div>

Dunno about the time it took, not much, but blueprint spaghetti cooking time varies greatly.

I don’t really know what’s needed as the request is not too detailed. This would be awkward to use if you needed it displayed in 2d - like an inventory screen. Currently it revolves around widget components attached to sockets (but they don’t need to be, ofc):

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/1/f1990de996d63c798dd00ae32c41c29b02a38f0f.jpeg)

You could easily track the health of all these body parts. Each widget is an extended widget component and does its own thing so this is pretty modular:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/7/a7be7fec6abd413f19dddacea39f0030c65920c4.png)

It’s not really feature-rich but it seems like a direction that would work. Again, depends on what is _really_ needed.

I can push the project your way if it makes sense. Perhaps you can take it further.

---

<div class="post-metadata">

**Author:** ![Hibs1990](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hibs1990/32/88711_2.png) [@Hibs1990](https://forums.unrealengine.com/u/Hibs1990)\
**Post date:** [July 9, 2021, 9:35am UTC](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988/6 "2021-07-09T09:35:20Z")

</div>

Yeah that would be great thank you. It’s for a FPS game so should work. You have a PayPal account would happily buy you a coffee for this?.

---

<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:** [July 9, 2021, 10:08am UTC](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988/7 "2021-07-09T10:08:37Z")

</div>

- this works with Point Damage; as debug the player damages itself with 1.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/1/d1b85797ae37c6f69745cb3bd11498ba0f0e00f9.png)

You probably have a better way of dealing damage, though so use what you’ve got.

- the translation from hit body part → widget is based on those 2 maps:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/0/501aabdbaea3940437bad075d1b132d84dbb6146.jpeg)

One map must populate on Begin Play since widgets are yet to be created. When a bone is hit, we send data to the associated widget. This could be done with a single map but seems more flexible this way. (in case you have something with 2 heads and 4 legs)

- assets are here:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/6/56f9f218532e59bf75354f03b2d5504cc8e5866b.png)

- the math bits are in the components (WC\_PB stands for Widget Component\_Progress Bar), there’s no script in the widgets whatsoever

- Project Link:

> **[HealthBars.zip](https://drive.google.com/file/d/19oxOWwvzZEaOeuGuLnlIyRPqatpUB7Zw/view?usp=sharing)**
>
> Google Drive file.

> coffee

Nah, it was a cool exercise. Never made anything similar before so the chances are it can be _vastly_ improved. There’s a ton of stuff missing before this get usable, ofc. Just an idea at this point.

Good luck!

---

<div class="post-metadata">

**Author:** ![Hibs1990](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hibs1990/32/88711_2.png) [@Hibs1990](https://forums.unrealengine.com/u/Hibs1990)\
**Post date:** [July 9, 2021, 10:49am UTC](https://forums.unrealengine.com/t/heath-bar-for-different-limbs/238988/8 "2021-07-09T10:49:21Z")

</div>

Thank you I can learn from this as well. The main problem I was having was knowing where to start.  
This will be so helpful I appreciate it man. Would still happily buy you coffee for this. Let me know
