Hey there Shannon. Triggering a widget’s visibility can be done by using bindings in the widget’s “designer” area. But there’s a bit of setup that needs to happen first. [I made a step by step video showing how I did it.][1]
-
Make a widget (I believe you’ve done this) - Right Click on the Content Browser, then > User Interface > Widget
-
Call the Widget in the level - Go to your level blueprint and on EventBeginPlay do this:
(My widget is called Widget to Show)
-
Make a boolean variable inside your player character (or whichever actor you use to trigger the box) and set its default to false.
-
Drop a trigger box, click on Blueprint/Add Script button to make it a blueprint. On its event graph, do this where WidgetVisible is just a boolean I created and CastToTopDownCharacter should be replaced by whichever actor you want to trigger the box:
- On the Widget’s design panel, click on the object you want to hide and reveal, and on its properties, go to Behavior, set its visibility to hidden, then click on the Bind dropdown and create a new Binding. That should look like this:
Then open the newly created bind function (probably called GetVisibility_0) and add this code:
(I created the WidgetVisibility variable by right clicking the return node’s result value and choosing promote to variable)
Then it should all work. Good luck!