Set Death after Health is lower than 0

Hey there! I want to ask… I have this system for health and refilling health, including UMG. But my question is how to create death when health percentage is lower than 0? I have widget ready for death so I thought it might be done by that.

Hello,

Could you do something similar to the setup that I have in the picture below? Keep in mind, this is just a sample, and Tick is not the most efficient way to do something like this.

I basically got my Health variable, and then checked to see if it was less than 1. If so, I destroyed the actor. If you have death animations, sounds, or anything else you’d like to fire off before you destroy your character, you can do that after the True execution pin on the Branch node.

Feel free to let me know if there are any questions.

1 Like

wow! thanks mate :slight_smile: it worked

It is not happening with me