Setting a widget button visibility to visible after interacting with an actor

Hello, I’m currently trying to create a collectables menu, I have a collectables widget with only one button inside with the visibility set to Collapsed

tl;dr: I’m trying to replicate the collectable system from Outlast, you pick a document, you can open a menu, read the document, and if you don’t have it, the option doesn’t show up. However I can’t get a widget button to show after the event is called.

Here is the widget designer blueprint:

here is the graph that’s supposed to set the button to visible:

And here is what actually happens:

And the button is still collapsed/invisible even after the print string telling me it worked, as you can see in the screenshot below:

I tried setting a boolean after the pickup event, create an event construct, setting a branch with the boolean I created to true set visible, false set collapsed/hidden, and it still doesn’t work.
However, if I just set an event construct and set visibility to visible, it works.

Hey @brenobrm! Welcome to the Forums!

I can see you setup your set visibility node correctly from what I can tell. What triggers your “unlock documents event”? Is that activating correctly? Are you getting “picked up” in your log showing the blueprint completed correctly?

1 Like

Yes, I set the print string specifically for that, the event is triggering correctly as you can see from the third screenshot “picked up”
The event is triggered after I press the interact input, then it goes through the gamemode, a few event dispatchers… and to make things shorter, I just added the print string at the end to confirm it’s working, but if it’s necessary I can post more screenshots.
And thanks.

1 Like

Check the visibility of horizontal box. It should be “not hit testable(self only)” if you want to press the button.

1 Like

Yes, it was already set as “not hit testable(self only)”

1 Like

You should create the widget before the event. Events last only one tick and creation of a widget is not instantaneous. If you use this event to create the widget ,the event will not be (re)triggered in widget blueprint.

1 Like

The widget was already created, if it wasn’t, the log would open as soon as I closed the simulation telling me that, the widget was created on the gamemode blueprint:


You can also see an event bind that’s triggered after I interact with the actor I placed on the level that will then call the event to set the visibility, and to make sure the event is being called correctly, I placed a print string “picked up”
But I’m probably missing something here, using an event construct instead of the custom event sets the visibility correctly, however, that’s not what I’m trying to do since I need the pick up condition for that
Edit: I think I get it now, will try creating the widget again when I get the chance
Edit2: no luck, button still doesn’t show up after creating the widget again, removing from parent and creating again doesn’t help

1 Like

For testing purpose, draw a “delay until next tick” or “delay 0.2 sec” from documentexperimentresults (red custom event) and connect to unlock documentexperimentresult(blue event).

1 Like

No luck, might be something else in the gamemode that for some reason won’t update the widget after it’s created for the first time, but I’ll probably scrap the collectables gallery idea since it’s been more than a week trying to make this work and there are other things I gotta work on for the project

But thanks for your time trying to help

1 Like

What does gamemode do ?

1 Like

Creating widgets and other things connected to an event begin play and sequence, but at the time I was thinking that when I first create the widget, its getting the initial settings of all buttons, texts, etc. And because of that, when I trigger the event, the widget wasn’t updating because it was already created.
In short, what I think it’s happening is that the widget isn’t updating

1 Like

Do you create widget once and toggle its visibility when clicking on object or do you create new widget every time you click on object?

1 Like

I think I tried both, creating once, then tried removing from parent both in the gamemode and widget blueprint and creating again, I’ll try again later and edit to be sure