Showing a widget when the player has less than 0 hp

Hi,
So I want a widget to appear when the player loses all of his hp and I was doing this when I was pressing the Z key and it works but now I was trying to make it show only when the player had 0 or less hp and it doesn’t seem to work.

Any Suggestions?

What actually doesnt work ?

I want the Death widget to appear when the player has 0 hp or less. And it doesn’t appear

Well, the cast node is never triggered in your code.

oh yeah thanks i just connected to the event tick and then also put the do once node and it worked thanks

1 Like

Cool. However, I don’t recommend you to use event tick for that kind of thing. As it is fired every frame, it means that the condition health < 0 will be checked every frame too. This kind of thing does not really affect performance ; but if you can use something else than event tick, do it.
When does your character lose hp ?

they lose damage when they collide with an enemy/ are attacked by an enemy

Well in that case, everytime the player loses hp, do the hp check, but avoid event tick.
If you need extra help, ask me or ill give you my instagram - to not spam here.