ahh thats made it go from 100 to 70 to 40 to 10 but then it goes to -20, so the my character isn’t dying. and also the health bar still remains the same.
As I said, the standard implementation has no real health implementation. If you want your character to die, you have to do it yourself. Disable Input, Enable Ragdoll, let him explode or whatever your prefered reaction to death is in your game
Well, but that shouldn’t affect your health bar. I guess there is some other problem that is causing the issue.
I am not sure, but it might be the function GetPlayerHealth() in your HUD that is not returning the right health, but well. You should really learn to debug your code. It’s a nice skill to have
So basically you follow your code flow and check where things could possibly go wrong. Then you investigate it bit by bit (either through prints or breakpoints) until you found the issue.
Thanks DennyR, I’m attempting to get my player to die at 0 health now, then I’m going to dig through the HUD BP to see if I can sort it out.
If I figure it out ill post back.
If somebody else thinks they know what the issue is then don’t hesitate to tell me what for
Ok! I’ve sorted it. I checked the content example HUD and everything was perfect and for some reason it didn’t work, so I went for a different approach.
It may not be the best way but it works and that’s fine with me for now.
sets that pawns health, sets a condition that says when the health reaches 0 simulate the player physics (ragdoll which was ticked components tab) and then it loads the level again after a 5 second delay.
I’ve left the print health there for my own sake.
-if there’s a better way of doing please let me know.
It basically draws the texture based on a condition which if met then it displays the correct texture.
If i had done it using flash and scaleform then i would have probably set it to go to a specific frame based on the health.