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.
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.
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?
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.
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.
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
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).
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
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
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