UMG Usage - Making A Special Health Bar

I’m actually trying to do a health bar, a bit like the one you can find in League of Legend for instance.

The health bar should have multiple section in it. Let’s say that the player have 450 HP and i want a split every 50HP.

That means that my health bar should be slice in 9 for this example.

The thing is that I’m pretty sure that I need to create a base texture with at least a split in it and then try to tile that base on the maximum HP, but in fact I really can’t manage to find a way to do so in the UMG.

I’m pretty it’s fairly easy too and I will probably sound dumb but anyway if any of you have anything to say or to link that can help me get over this thing I’ll be very gratefull.

this is nice, but it’s not what I really want to do, I don’t think.

It’s more like in this video what i want to achieve Overthrow Paragon - Some grapical improvements - YouTube

See if this helps:

This is actually much easier, looks like a standard progress bar with a textured background. If the background needs to be dynamic, you could use a material for that. There should be plenty of tutorials on YT for standard progress bars.

Unless I’m missing something special about it. Do tell if there’s an element you’re not sure about.

Well, I think you are right.

It needs to be dynamic just didn’t know a thing about material for UMG will dig a bit in that way thanks :slight_smile:

You could also just glue the background together, like demonstrated in the linked thread. Just use images without edge gaps. Material approach should be fine, too. Good luck.

wouldn’t it be a bit less efficient than a material ? because the maximum HP may change a lot

Well, look like I got it working if only I knew that material can be used on UMG before ^^’

Thanks a lot

Yes, i’m trying to do as much as I can in c++ such as all the code that will rule the WidgetBP, I pretty mutch just use a WidgetBP to place the element on the UI and then bind them in my c++ base class for this widget.

Well, that was fast!

When it comes to performance, I am unable to answer the question. Too many factors. Perhaps one of the Epic’s top brass could from the top of their head. You could always use both methods and post the results.

However, if I may suggest something - consider focusing on something that’s the easiest to implement and, most importantly, maintain. Blueprints are somewhat slow when compared to native code anyway. If you want superb performance, you go C++. Besides, the cost of running a widget is pretty much negligible unless it’s a mobile app. Not advocating bad practises, though.

Good luck!

Would you mind sharing a screenshot of how you pulled this off? So that people coming to this thread like myself can figure out how to use a material with these progress bars?