Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

alt text

alt text

I sincerely appreciate the help on this! :D

Product Version: Not Selected
screenshot.jpg (486.8 kB)
screenshot1.jpg (448.2 kB)
more ▼

asked Oct 01 '14 at 03:33 PM in Blueprint Scripting

avatar image

20 8 10 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

Cheers, Nick

more ▼

answered Oct 01 '14 at 03:47 PM

avatar image

Nick Darnell ♦♦ STAFF
6k 77 37 151

avatar image arthursgqg Feb 08 '16 at 10:04 PM

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?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question