ClockworkOcean’s note was correct, you’d have to change your structure so the take damage function is before your is animation playing if statement, or potentially better, use a sequence node so your visuals don’t interfere with your actual damage statements.
The best way to update a widget to display the health correctly is as Dacabad said, bind the percentage of the progress bar to read from the EnemyHealth variable. Also your progress bar is most likely not updating until the third hit because the value of “1.0” is what makes the progress bar widget look full, 0 is empty. Your enemy health is probably still higher than 1.0 after dividing by 100.
Instead of dividing by 100, I’d suggest you use the Map Range Clamped node in your widget where the variable EnemyHealth is being bound to the progress bar. See: https://docs.unrealengine.com/en-US/…ped/index.html
Input the EnemyHealth into Value. Leave In Range A at 0 and Out Range A at 0. Put the Max Health that your enemy can have at In Range B. In Out Range B put 1.0. Plug the return value of the map range clamped node into the return percentage of your progress bar and that should do the trick.
I’ve attached an image of the setup of a binded progressbar in my own game that you can alter to fit your needs, which illustrates how to use map range clamped. HealthToDisplay being a local variable so the function will always return something even if the actor reference it’s trying to read no longer exists (defaults to 0 if the reference check returns NULL)
It’s already solved because the problem here was when I put my progress bar and resize the x value it doesn’t perfectly fit on my 100% health what I tried was put the progress bar as it is (the default size) then try again my health bar and now every hit is updating the healthbar.