x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

alt text

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.

alt text

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:

alt text

Damage taken:

alt text

Product Version: UE 4.15
Tags:
more ▼

asked May 25 '17 at 08:08 PM in Using UE4

avatar image

Dylanrockin
1 3 7 12

avatar image Zaftan Feb 28 '18 at 06:39 PM

is this challenge solved or is it still on going? i am having the same challenge so im hoping someone can anwser this. kind regards, zaftan

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

https://docs.unrealengine.com/latest/INT/Videos/PLZlv_N0_O1gb5sdygbSiEU7hb0eomNLdq/Wwa0zwkYUeQ/index.html

more ▼

answered Mar 01 '18 at 02:03 AM

avatar image

Ruffhaus Games
663 13 9 23

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question