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! :D
asked Oct 01 '14 at 03:33 PM in Blueprint Scripting
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 :)
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.
answered Oct 01 '14 at 03:47 PM
Nick Darnell ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here