Hey, I’ve been working on my healing system, and the thing is I have 2 widgets that should be displayed, one for being heavily wounded and the other one for being lightly wounded, and one of these widgets should display continuously until player wound use MedKit but when I use it it does not remove the widget but health is changed. Here are the screenshots
By the looks of it, your Check Health HUD is creating a new widget every time you call the event. Which causes you to have multiple widgets made within the viewport every time you press Q. Using the nodes “Create Widget” and “Add to Viewport” is making a brand new widget everytime, however you can use the node “Remove from Parent” to remove the widget!
I’d recommend restructuring your events like within the construction or begin play of your player character or player controller to create the two Widgets and set them to variables like you already have in the Check Health HUD event → then use the node from the widget references called Set Visibility and use the option “Collapsed” for both widgets.
Afterwards, change the “Check Health HUD” event to no longer create widgets and use the Widget variables you made to create the node Set Visibility on the widget. Now you would be able to show/hide widgets by either using the option “Visible” for showing or “Collapsed” for hiding.