How should I use Draw Text?

Hello, How is it possible to draw a variable Text?
Even without localization, that’s not a problem.
I have tried some things:

  • Use Print String function, which actually works but it’s not so good loking (also because it has a fixed position on the screen)
  • Tried to edit the Character putting in front of the camera a box which should handle an instanced material whic has for every sentence a different texture which defines its opacity according to the letter’s position (Which is a very loooong work)
  • Tried to Interacte with HUD, everything it’s fine but if i call Draw Text from Blueprints, it doesn’t work and gives me a warning which says that I have to use Draw function only with DrawHUD Event. This one can be used only in HUD, so I tried to use only this for dialogues, but actually, if i put a branch which checks where’s player position and then fires off text and sound, it emits only the sound and no text.

Make sure you make a new HUD BP and assign it to your gamemode BP so its actually used.

Other than that having a drawtext node coming straight of Recive DrawHud should work. Just set the text colour, scale (if this is 0 it’ll cause your FPS to drop) and make sure you select a font or nothing will show up.

I was working on that but i wasn’t able to draw subtitles at the moment i desired. Here’s how i solved it:

If you see something weird, feel free to comment!

I was wondering if any of you have come across the need to drop text on top an existing material that is being drawn by the HUD? I have an item inventory with stackable items that I want to draw some text on top of icons but for some reason it always draws the text behind the inventory. I have tried a few things like reordering the draws and some other stuff but nothing seems to work.

Any ideas?

I Amus, why dont put a trigger in the map that send with a interface the text?, imo try to dont “think” in the hud blueprint.

It should just be a matter of drawing the Text after you draw the inventory textures. I have hotbars that draw text over the top and I just tried putting the draw text before it and it draws it underneath (invisible), but it’s fine if it’s after.

The GUI is drawn “back to front” so to speak… whatever you draw first… will be in the back. So you draw your texture after the text, the text will be covered.