Float works as health variable.
Enemy actor has default 100 as float every time the level starts.
For testing purposes, I have a collision box on my player character, and when the enemy actor overlaps, it subtracts 10 points from the float. with 10 hits, the enemy character loses all its hp points and its pawn gets destroyed.
This already works fine, but I want the float to be displayed on the widget, both as a progress bar and a text.
I have already gotten the overhead bar working, i just need the reference to the health variable and the real time hp drops every time he gets hit.
With testing, i have seen that the enemy receives damage and gets destroyed with 10 hits, but the float and the bar both stay at 0. How do i reference and animate the health bar?