how to display health bar on hud when picking up item
Hi everyone, I have a widget blueprint setup with a health bar. I want the health bar to be unvisible in level 1 and 2.
In the 3rd level the health bar should become visible but only when i pickup a power-up called Health for example.
How can i implement this in blueprints?
any help would be greatly appreciated.
asked May 11 '17 at 02:39 PM in Blueprint Scripting
If Im understanding your earlier comments correcly mabe you havent added your hud widget to viewport? This would allso get you a reference of that instance whereby you can directly "talk" to that widgets plueprint as the previous answer hinted at.
you can construct widgets in the "begin play" of the player controller or the level blueprint for example.
answered May 14 '17 at 09:33 AM
The easier way would be to control the visibility behaviour of the health bar via blueprints. Just make sure that in the blueprint where you check the condition 'health bar can be shown' you have the HUD with the progress bar in it in a variable, that way you can just get that variable, from there get the health bar (I'm assuming it's a progress bar), and from there set visibility. Kinda like this:
answered May 11 '17 at 06:03 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here