Heath Bar for Different limbs

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.

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.

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?

3 Likes

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.

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):

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:

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.

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?.

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

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:

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

  • 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:

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!

2 Likes

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

1 Like