visibility hud question

Hi all, i already created a question mentioning this problem. This is the link to the question i have. how to display health bar on hud when picking up item - UI - Epic Developer Community Forums

i created a HUD visibility event but i don’t know what i’m doing wrong. I have included a screenshot of what i want to create ( First screenshot HUD Problem)

In the second screenshot ( The Blueprint ) i have a blueprint event setup in the pickup blueprint. The problem is that the event fires but the visibility does not get set. PS: Yes i have toggled the icon and the progress bar’s visibility to hidden in my HUD widget and tested this out but it does not work.

Questions:

  1. Do i need to create a binding on visibility in the HUD Widget?
  2. Where do i need to place this blueprint event?
  3. With what node do i fire the event? I don’t think the actor begin overlap (sphere collision) is required.
  4. The HUD nodes in the blueprint are references to my HUD. I don’t know if the nodes i use are wrong

If anyone has a idea on how to get this working please share it. And make sure to include some blueprint screenshots ( would be nice ) :slight_smile:

Any help is greatly apreciated.

Oh and i’m on the third person template with a ball character. :slight_smile:

I found the solution to my own problem. Here it is:

Firstly go to how to display health bar on hud when picking up item - UI - Epic Developer Community Forums and scroll down to the middle. Create the “HUD Reference” node and then do the following.

In the widget blueprint i set the health box to hidden, then in event graph of the widget i created a “custom event” and named it “Toggle Visibility” ( red node ).

I connected that to “set visibility” ( target is widget ). Set it to “visible”. In the target i have called a “get health bar” and connected it to target of “set visibility”.

After that i created a powerup blueprint, i have added a “sphere” and a “sphere collision” component. I clicked the “sphere collision” and in the details under events i clicked on “oncomponentbeginoverlap”.

Connected “oncomponentbeginoverlap” to a “get all actors of class” node, On the “out actors” node i connected a “get” node, after that i connected tha “hud reference node” and after that i connected the “toggle visibility” ( blue node ).

Maybe this will help you.

Peace