Removing Specific Widgets

Hi there,

I’ve previously created a web browser widget and a button for it which should appear when I step on a box

Then I added an interaction prompt using an actor blueprint (cube) and sphere collision

When I begin play, the button I created to open the browser automatically shows up without me going anywhere near the interaction area of the browser widget

also when I click close, Remove All Widgets removes all Widgets and I wonder how I can remove just and only the browser widget

Thanks in advance

Web Browser Widget:

The Button to Open it:

The Cube for OverLap:

The Interaction Prompt (more like a label actually)

I know that I should be removing Remove All Widgets and replace it with something else to specifically remove the Browser Widget and the Button etc

However idk how to do that… I couldn’t figure it out.

Thank you…

I believe what you want to use instead is Remove From Parent and pass in a reference to the Widget you want to close. I’ll update this post later with an example of how I use it in a project.

Edit: this is how I use it in my project. @SylarAtomic gives a nice explanation below.

2 Likes

Thank you so much. Waiting for all the answers I can get from everyone. Another problem I forgot to mention up there is; the pano_base button which should appear on overlap with the overlap cube appears from the beginning. Then I have to close it.

I don’t understand any of this.
You already remove the widget with clicking on exit button. Just erase remove all widgets.

Also, what does The Interaction Prompt do? It sets the visibility of some widget to visible on begin overlap and end overlap.

I just did that, thanks for this. I’ve been using the blueprint for a week now so even the most basic things don’t come to me especially after someone does something for certain in a tutorial.

But now, the pano_base widget won’t disappear.

The workflow is supposed to be like this;

I should step on a cube and a button that says “click here to read” should appear, which it does

On button click, the browser should come up, which it does at this point too

When I’m done, I click the exit button and it closes the web browser widget, this also works

But at this point the “click here to read” doesn’t disappear because I’ve deleted the Remove All Widgets

And I just can’t figure out how to remove just and only the “click here to read” on end overlap

I just need to find a way to remove this text from the screen alongside the “exit button” in the right upper corner

I tried to get “Remove From Parent” after EndOverlap but it doesn’t come up

I was going to create the same behavior of the exit button for the endoverlap like this;

But like I said couldn’t find Remove from Parent (if this would be enough to remove the text once I step off the cube anyway)

Thanks for helping a rookie out

Edit: as for the second question regarding The Interaction Prompt and the visibility set for both instances, it’s a rookie mistake too

I had to remove the visibility at the bottom… thanks for pointing that out too.

Hi @ErenHatchet,

What I would suggest you do, when you create each of the widgets, take the output and assign that to a variable like you have done with the Pano which you are setting to the base UI. Then when you want to remove that specific widget, you get that variable, I.E, Base UI and put that into the input for the Remove from Parent node.

Get Base Ui → into Target of Remove from Parent

So something like this:

“I should step on a cube and a button that says “click here to read” should appear, which it does” → Add this Widget to a variable. (ClickToReadWidget)

“On button click, the browser should come up, which it does at this point too” Add this widget to a variable

“When I’m done, I click the exit button and it closes the web browser widget, this also works” → Get ClickToReadWidget → plug into Remove from Parent node.

Thank you for this,

I’ve created it as follows and now it works when I step off the cube;

Simple, and efficient

However now I got another problem

When I place the box within the proximity of the Collision Box of Labels I’ve created for the interest points, such as the Label or The Interaction Labels in the first post, the Pano appears from the beginning…

The red circle in the screenshot above shows the location of the cube for overlap events and it’s placed within the proximity of collision boxes irrelevant to it, or at least this is how I was thinking

and here you see how the pano, or the button in other terms appears as soon as I begin play:

I’ll be looking into this now

Would be in debt once agan if you have any suggestions or opinions regarding this

Think I need to limit the collisions to the cube or idk, just the player or smth?

As a side note; it just occurred to me that, I’ve got an AI character within that proximity as well. Idk if that has to do anything with any of these. But I doubt it.

Hi @ErenHatchet,

Yes, you can use the Other Actor pin of the EventActorBeingOverlap to check if the overlap is your player. There are a few ways of doing this. One of the simplest ways is to use tags.

In your player BP, search for tags in the details panel. Add one such as “Player” under the Tags array. Then from the EventActorBeingOverlap node drag out and use the Actor Has Tag node. Use a branch node to check the condition and put the code under the true path.