I am working on a healthbar for the player, my cast is failing every time, and am not sure why, attached is the blueprint for my casting.
The Casting is bound to the progress bar, but the progress bar is not showing any depletion of health but the health variable is changing within the blueprint as I play the game.
Thanks for any help–
If PhysicsBallBP is NOT the actual player character pawn, then this will fail everytime. Ensure that PhysicBallBP is set in GameMode also and that it is being controlled.
Well, I didn’t read your question properly the first time. But, you said you were using a progress bar. You need to use a percentage for progress bars since it is 0 to 1.
If you want, I can stream this live and help you real quick.
I have PhysicsBallBP set in the GameMode as the pawn. The tutorial I was following was UE4 Tutorial - Health Bar + 2 Ways to Take Damage - YouTube, my error occurs around the 8:00min mark.
The first image is the function bound to the percent of the ProgressBar, so isn’t that giving to progress bar its Percentage info?
Nah, you would think it was automatic, but it’s not. You need to do the proper math. You can either divide it(the HP) by 100 or multiply by .01. the choice is yours.
If this answers your questions, please upvote and mark as answered, so we can resolve it.
That seems to be unsuccessful. I altered the blueprint and didvied the HP by 100.
Event graph as reference.