How to Make The HUD Change Based on Damage Received
This is something that I was wondering, because I created a health system and it works perfectly. I've finished working on my basic HUD, but I wanted to add some interesting bits of polish to it that makes it change based on taking damage. I already have my HUD set up to subtract health, however what I'm really interested in is making the player icon in the upper left change whenever you take damage. I assume you have to use a Widget animation? This is what I have so far:
So, I'm not even sure if this is the right way I'd go about having the animation play out, since I'm not familiar with the way you check if the player takes damage.
And this is the animation in question. Basically what it does is whenever the player takes damage the player's icon, very quickly, changes to red and back while also changing the player's icon a different graphic entirely.
Example of what I mean: As you can see the player graphic completely changes to a version that shows the icon flinching and turning red, however, I am not sure how exactly you go about doing this in the Widget editor and in blueprints.
No damage taken:
asked May 25 '17 at 08:08 PM in Using UE4
I might be missing something here but if you're already passing information to the health bar I'm assuming you have a reference to your HUD from your character? Why not just call a custom event/function at the same time to play the animation and set it's play mode to Ping Pong?
If I'm not understanding you correctly sorry, but might I suggest checking out this video from the Twin Stick Shooter tutorial.
answered Mar 01 '18 at 02:03 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here