Health + Shield in one progress bar
How to create a health bar similar to this, which has both shield and health in the same progress bar. If the player does not have a shield, the whole progress bar is covered by health and if the player has a shield the x% of the progress bar is taken over by the shield and rest y% belongs to health. ![alt text] : /storage/temp/258878-unknown.png
asked Nov 08 '18 at 06:17 PM in Using UE4
2x progress bars (or even borders, depends on what you need, really) wrapped with a horizontal box, with Size set to Fill:
The Size variable dictates how much of the parent space the widget occupies. In this case, the blue one has been set to take 25%, the green takes 75%.
When the player loses the shield, set the green to 1.0 and hide the blue. If you use a progress bar for the health, you'll have an option for the player to have a bit of health and a full shield, too.
I would just use the "overlay" option. Create 2 progress bars, health first then shield so shield is always drawn last and over the health bar. In the shield's background style options, go to tint, set the alpha to 0. You now have 2 overlaid bars when the shield depletes it will reveal the health bar below. Each can be independently controlled with code/script to function however you like in your game.
answered Nov 09 '18 at 03:20 AM
Nebula Games Inc
Follow this question
Once you sign in you will be able to subscribe for any updates here