Widget issue

Hey, I faced this type of problem when character uses Med Kit (Healing himself) then widget should be deleted until character’s health drops to a certain HP again, and it does work… but only once and only when Lightly wounded, but when it’s heavily wounded then it doesn’t work. Here are the screenshots:


I tried multiple ways of reconnecting and replacing some values but nothing helps. In advance thanks for your reply!
P.S.: In order to see the image just press on them

the images are not showing.

You need to connect your Widget Ref to the is valid node.

yes but when I do this and press compile it gives an error

post a screenshot of the error.

Connect the reference to both Is Valid and Remove From Parent. Just like my image showed.

then it’s just not removing the widget itself

Remove from Parent has to come off the Is Valid pin… Not the Is Not Valid pin.

Sorry I didn’t catch that in the first pic.

Is Valid checks to see if the reference (Heavy/Light Blood) is not empty. That you actually created the widget and set it.

IF it is not valid (Does Not Exist), then obviously you cant remove it.

So, IF Health is Less than or Equal to 0.3
[true]-> Check if the Heavy blood ref is valid, if so remove it
[False] → Check if Light blood ref is valid, if so remove it

Overall I think your flow logic is wrong.

at this point I just went back, so it does remove lightly wounded effect but only once and it doesn’t work for heavily at all. I know that entire thing is complicated, I just started and learning takes quiet a lot

I’m currently in a session, but when I’m done I’ll draft up the appropriate logic flow.

Hang in there. :flexed_biceps:

thanks, I’ll wait :+1:

Call the Create Widgets event on begin play. This just preloads them and then hides them.

Do your health update, then call Check Hud Health.

@FrastiONE Just as an FYI a Post Process Material applied to your camera would be more performant and easier to manage.

1 Like

OK, thanks a lot!