Select an object and display text on screen

I’m trying to set up a blueprint that will allow me to interact with an object by pressing a key, let’s say “E”, while the first person cross-hair cursor is on it and then have text display near the bottom of the screen on the HUD giving a description of the object that was just activated. Then the text will disappear from the screen after so many seconds.

I’ve looked at several tutorials on having text display on the screen and interacting with objects but haven’t had any success trying to put it all together and am not sure if I’m going in the right direction with this. Any help getting this figured out will be much appreciated.

I’m also using the first person template for this project.

how far have you gotten with this, or where does it seem to be breaking? if you post screenshots of your blueprints, it will be easier to determine what works / doesn’t work.

a few things to check:
-verify a line trace between camera and object actually detects a collision (or an overlap depending on how you’re triggering the event)
-build a simple function that toggles text on/off your screen using keyboard input

Currently my blueprints are a mess and I haven’t had a chance to clean them up and screenshot everything. I keep trying different things but no success.

Here are links to the two tutorials I’ve been basing it on. For the first tutorial, I downloaded the source files and tried replacing the “destroy object” aspect and have it draw text to the HUD instead but couldn’t get it to work. I tried the same thing with the second tutorial as well. I’m not sure if these tutorials are the right direction for what I’m trying to do. So any feedback or tutorials that may be better suited for this will help.

I will have some screenshots of my blueprints I was trying to figure out, by the end of the week, if that helps to clarify things more. Thanks again.

Tutorial 1:

Tutorial 2:

Insted of trying to find “Use when pressed E” tutorial, break your problem is to separate task,

“how to detect the object is looking on”

You can do that via line traces, they detect if something is in the line from point A to Point B and return first hit actor, from that you can interact with actor that, for example call Use function in it. Here docs

https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/index.html

Make a base class for all interactable object which will have Use() function and other as you wish. You will need to use line traces on tick if you want to make it reponsive, maybe put find actor in varable and clear varable is nothing is find, from that varable you will be able to access item that player look at

“Display text on HUB”

Use either UMG:

Or classical canvas HUD

https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/Blueprints_HUD/1_1/index.html

“Make text display something”

If you use UMG, then store it instance in varable when you spawn it, use same type of varable as your widget blueprint and before set cast to it. Now you can interact with that hud, in widget blueprint you can make a function
“Set Interactive Text” with string argument. On tick that you line traceing you can detect if new actor is find if it you set the text in UMG.

“Hoe to use item”

On E button press simply call Use function on actor find by trace which you set in varable, check is varable is valid (there node for that “is Valid”) as you will clear that varable when player wont look on item anymore

Insted of trying to find tutorial for very specific things, learn how to make your blueprints interact, try to divide a problem to smaller things, learn in the way that insted of searchiing for tutorial, you can figure yourself how to do things, if you can’t figure out how to do things then you not learning anything insted you only copying what is done in tutorial.

Here you have my tutorial about classes and objects, it might open your eyes on how blueprints… or rether classes work:

Referencing a bunch of documentation and telling someone to break a problem down to separate tasks is like describing the water when someone is drowning. Why don’t you just give a straight answer with blueprint examples of how to solve the problem? (picture is worth a thousand words)

I too would like a cursor that animates when over an NPC or inventory item, and prints the name of the item or possible action next to the cursor, the way we see it in games like Fallout 4.

I don’t need a lesson on problem solving, or to have my eyes opened, just a few blueprint examples would do.

With so many interactive and inventory items in a typical RPG, we need a simple solution to naming, and showing that name on screen when the cursor is over it, and defining the possible interactions, without creating a tone of bps. Perhaps a solution with a data table? Oh I forgot, UE4 does not handle dynamic variables in data tables and bps very well, another fundamental feature of any inventory system in an RPG, missing from UE4.

Any help would be appreciated. But please, all that pontificating does not impress me, this is an "AnswerHUB after all, I am after real answers, just a few pb examples would do. Some of the posts here remind me of those disingenuous professors that never taught anything, they just pointed you to the book when asked a simple question.

Don’t expect people to do blueprints for you, problem solving skills are very important in programing or else you end up asking questions on anwserhub over very basic things and be prisoner to tutorials forever which considering number of questions asking why tutorial does not work people don’t even understand them either.

Person asked to “point in good direction” so i trying to point him in right direction.

I found shadowrivers guidance very useful, don’t get me wrong a screenshot of how to make it in BP is great but it doesn’t give you the understanding behind it.