Dear Community,
I am trying to implement a Widget for my HUD.
When the Player is looking at (linetrace) a breakable object (actor), an icon should appear to indicate that its breakable. That part is completed.
It should also display the target actor’s Health in a progress bar. (GOAL)
The Widget is created in the PC blueprint, and the hide and appear function is also in the player BP.
I wanted to bind the health of the actor viewed to the percentage of the progress bar .
Attached an example from an old classic.
The actor is already set up with a health variable. The actor has it’s own class interface (destructable). The icon appears when linetrace hits a destructable actor from a short distance. Can it be managed to grab the linetraced actor’s health variable for the hud?
Do I have to bind it? (I tried binding the Percentage of the progress bar to the actors themselves, but no matter what i tried, it always displayed the first actor’s values only.)
How can I go about this? Thank you in advance.