Want text to pop up when looking at certian objects

Hi there,

I want text to pop up when I’m looking at certain objects. (Like “Press E to open”).

So I know how to fire a line trace and recognize the actor via a blueprint interface. (The communication is between the player BP and my object’s blueprints).

The problem is I’m not sure what to put in the the Line Trace’s input. I know how to fire a trace with an input button but how do you make it constantly fire without pressing a button?

And then what is the best way to put text on your screen (not like print string which shows up in the corner, but text that pops up in the middle of the screen of hovers over the object)

I’m not sure what the best way is to approach this. Any help would seriously be appreciated.

OK figured out how to make the tick fire constantly (or every frame).

You use an event tick. Originally I couldn’t figure out how to create more than one Event Tick but now I do. You create a custom event for each event and connect it to the action/function.

Then you create a reference to these events and connect them to the main Event Tick. I followed the logic from this post - Is it possible to have 2 event ticks? - Programming & Scripting - Epic Developer Community Forums

NOW I still need to figure out how take create the text (currently using print string as a test). Also realised that it continually prints text while looking at the object.

I see a “Do Once” node works but how do I “reset” it when I look away again?