How to remove UMG Widgets using cast to?

Ok, so i have this little blueprint which determines the lose scenario of my game. MaxHealth is 3.0 and Current is 3.0 as well. What i want to happen is whenever you lose a life, first verify what is the CurrentHealth is. If CurrentHealth is 2.0, remove the “Heart1” widget which is just a button of a Heart. The same if the CurrentHealth is 1.0 or 0.0 which means you lose. The blueprint where i placed this condition is the “MyCharacter” blueprint. How can i remove the Hearts Widgets? What other approach can i use?

I sincerely appreciate the help on this! :smiley:

If the hearts are in the viewport, remove from viewport, if the hearts are inside any other widget, remove from parent. I should probably make ‘remove from parent’ also work in the viewport scenario :slight_smile:

Another option is to just always have the hearts visible and change their fill by swapping out the image for a different brush and show empty hearts zelda style.

Cheers,
Nick

Hello, I’m new at Unreal and I’m trying to do a health system with hearts just like zelda style.
Nick, could you show me some image with what you said above please?