healthbar / Progressbar not updating
We're a group working on a school project, and we've fallen into a little bit of a headache. The problem is that the healthbar (progressbar) doesnt update on damage taken.
Here is a picture of the blueprints that are suppose to update it:
Now, a few facts to save time:
The blueprint is written in the Character BP. The "HP Main" float has a value of 100. The widget (healthbar) shows up on screen. The character DOES take damage, and dies after X hits from the enemy.
Best regards, Mats J
asked May 31 '17 at 12:11 AM in Blueprint Scripting
A better approach is to go to widget graph > go to the bound function graph, from there do the same thing but instead cast to the blueprint where the player health is stored. And you should be just fine. This is the proper way to deal with a widget. In my example it is stored inside the character BP.
You also don't need an event for doing this. It will automatically update the health whenever it changes.
Follow this question
Once you sign in you will be able to subscribe for any updates here