Announcement

Collapse
No announcement yet.

How to display enemy health widget only when damaged

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    You sir are a hero. Thanks.

    Leave a comment:


  • replied
    Instead of checking when damage has been taken, just place the code that I told you after you apply the damage; alternatively you can create an event dispatcher that fires when your BP above runs.
    Last edited by Jamendxman3; 06-24-2015, 12:08 PM.

    Leave a comment:


  • replied
    Right, that makes perfect sense to me, and I was trying to do something similar, but how do I check and see if damage has been taken? I am aware of the "event any damage" node, but I can't seem to make it work. Here is the blueprint for my damage to enemy:

    Click image for larger version

Name:	Screen Shot 2015-06-24 at 8.46.05 AM.png
Views:	1
Size:	166.5 KB
ID:	1080429
    Last edited by mcgillchris; 06-24-2015, 08:57 AM. Reason: attached picture

    Leave a comment:


  • replied
    That's simple, just make a Boolean variable 'ShowHealth?' and set it to true when you take damage, and then add a retriggarable delay after everything for take damage, and once the delay is complete, set the ShowHealth? variable to false. Only display the health if the variable is true.

    Leave a comment:


  • How to display enemy health widget only when damaged

    I've created an enemy health bar using widgets, and I'm wanting to display it only when that enemy takes damage from my character, and then disappear again a few moments after the damage was taken. I've got everything else working correctly, I just can't figure out the logic to make this happen. If you need screenshots of any particulars just let me know. I'm not looking for someone to have to do the work for me, I just need a little help figuring this out. Thanks!
Working...
X