How to make a text box with changeable text?

Hi,

Very new to game developing and have been following tutorials for my project. Unfortunately i can’t seem to find anything on what I am after currently.

My aim is to have a single text box in my HUD widget which will give info to the player. Like ‘Press E to interact’ or ‘Costs 250’ as examples. And these will pop up when entering a box collision. But i can not figure this out at all and i feel like this is probably very simple.

I have the text box as a variable as i suspect that’s needed. I imagine i need to create a binding, make some sort of blueprint in the function to the text box. Then in the actor that needs the prompt, tell it to show the text box and say a specific message. However nothing i try works.

If anyone has answer to this problem it would be hugely appreciated. Even if it is a link to a video explaining it.

Thanks for helping a noob

Hey @samhall1995

UE427_Interact.zip (1.1 MB)

The example projects show you how to use the HUD class for this. Either using a widget or using the DrawHud event :slight_smile:

2 Likes

Just watched through the top video you sent and that is exactly what I am after. Can’t believe I didn’t find that one. You’re a legend

2 Likes