I’m trying to make an image based health system that cycles through three different colored images (attached to borders) based off of how much HP the character has left. The overall widget works and comes up on screen but none of the images change to hidden no matter the health or what I do.
It should be continually updating the widget from the FPCharacter each time it takes damage so I think the problem is to do with the function that supposed to be hiding it.
I am quite new however so I could be missing something simple.
So it does update correctly and the pathing works in the UpdateHealth function, but it just won’t set the variable widget to hidden or hide it from the screen
Would it happen to be resetting it’s visibility somehow? It shouldn’t be based off of everything I’ve looked through so I don’t know, it’s my first time trying to hide widgets.
Through the an Action Mapping in the project settings, I appended it to an inventory system I was using but even when I added it to the viewport through a keybinding by itself it wouldn’t hide either
After that damage event (In the BP_FirstPersonCharacter) is triggered its sent through the PlayerMenu widget (which is represented by the last three images, the second and third being everything in the widget event graph, and the last being the function to close it)
I was able to make the menu as a variable by using Create a Widget, setting it, and attaching player controller to it under Event BeginPlay
There is a lot to the inventory system that I cant fit into one post, but I don’t believe that is the issue since even when they weren’t attached it wouldn’t hide itself when I opened it individually
Both the Event AnyDamage and Event BeginPlay are under BP_FirstPersonCharacter
And my bad after the Input Action it is sent through another widget I called the HUD (which is empty besides this and a canvas in the designer) which then adds the PlayerMenu widget (This holds the HealthIcons I’m trying to set to hidden) to the viewport
See what I mean? These are 2 separate widgets… Each has a life of its own. You’re asking the widget that is not even showing to hide its… checks notes heart images.
Use the widget you create in the Player BP only. Any other BP can access it quite easily.