Adding text popups when interacting with objects

Use a “box trigger” around the boat and make it as large as you would like the player to be able to interact with it. Then in your level blueprint, create the widget that has the pop up text you desire, add it to the viewport and then hide it. Create an overlap event for the box trigger in your level blueprint that goes something like this:

  1. on overlap → cast to player → successful? then set widget visibility to “visible”
  2. on end overlap → cast to player → successful? then set widget visibility to “hidden”

Hi, total newbie here, I am making an exploration game and the concept is that my character wakes up in a strange land , there will be a boat next to my character , I want the text to popup when my character goes near it and then disappear when she goes away. I checked online tutorials but all shows either to use the mouse interaction popups and text that appear when the game starts .Please tell me a solution for this .

Thanks

So like this.

Yea except personally I don’t like “creating” and “removing” widgets. I find it inefficient for something this simple. I prefer to actually create the widget in the level or character depending on it’s eventual use and then simply toggle it’s visibility. It lets you be more versatile with the text as well you can use it for other things and change the text, I’ve used widgets like this as a pop up HUD for a computer AI that talks to the player and then repurpose it to be a pop up for an interactable object without needing to “create” 2 separate widgets. But that’s my personal preference.

Thank you very much , I will try this out and let you know if I run into any errors !

Haha no problem. Right click on the output pin after you create the widget and promote it to a variable. That set widget is a custom variable. Then you can use that for the get widget node

hey I am a total newbie and I have no idea how you got the set widget part in the blueprint , I have created the box trigger for the boat and added the above blueprint functions you’ve shown except for the set widget and get widget part . i’ve created a widget blueprint with the desired text but i dont know how to proceed after that , im sorry for the trouble but I cannot find any tutorial to help me with this .

Hi , Okay so here is what i’ve done so far , I know this is very simple and you must be going like oh gosh this kid. so for easier explaining i’m putting some screenshots of what i’ve done.! as you can see ive created a widget blueprint and i have created a new HUD class and then in that HUD class i’ve created the widget and added it to the viewport. after doing that i’ve followed your steps in the level blueprint but I don’t know how to get the missing nodes in that . the New HUD class is visible when I play the game tho.

So this isn’t a tutorial for your specific case BUT it was the only way I could think of to show you how to do it since telling you “right click on the output pin” didn’t work. Skip to 2:00 and I show you how to make the variable thing. Once you have the variable created you can “drag” it from the left side panel of variables and say “get” to create the “get widget” node. Hope that clears things up for you!

I understood when you said right click on the output and promote to variable , the problem I was running to was different , thats why I sent the screen shot. the node pins I’ve marked in red in this screen shot

aren’t getting connected . thats the issue I’m running into

Ahh, well you haven’t actually “created” any widget. Look at the “CONSTRUCT” event, it says “none” because you haven’t selected a widget, so the variable isn’t holding anything so you can’t connect it up to anything because it has no data

Thanks for the help man . I found a tutorial finally on how to do something similar , ill post the link here , its very similar to what you said but a bit different.

I have the same problem, can you drop tutorial link here please? Thank you so much

I think this is what I am also looking for. Apologize in advanced. I have only been dabbling in VR an UE for 4 weeks. I want a popup to appear when the pawn hits the trigger box on an item I have in the viewport.


In the outlined blocks, I cant seem to find those nodes. The Construct node under the Class pin, shows me Outer not Owning player. I cant find just a SET node. Is the WIDGET node a ref, could this be a Widget I have already made? Lastly, I can’t find the Remove from Parent node.