How to display text on a Pawn HUD?

Hello guys,

I’m trying to display some text on my HUD’s player when he’s entering triggerbox. I’ve already did that in other projects and it worked fine. The difference with that projet is that, in this project, the player is controlling a pawn (“a marble”).
I am wondering if the function are the same as a normal player because the following BP isn’t working.

1st screen: Open Level BP (I am not sure if the get player controller + get HUD are the functions that I need there. I think that my issue is coming from there but I’m not 100% sure)

2nd screen: HUD BP event graph

3rd screen: HUD class option

4th screen: Interface BP screenshot

5th screen: HUD + BP interface

Don’t hesitate to let me know if you need further information,

Thank you all ! :slight_smile:

I could be wrong about this, but it looks like you need to enter the gate on event recieve draw HUD instead of drawing the text.

Is your game mode using this HUD class?

Hello and thanks for your answer.

I originally forgot to add it to the game mode but I did.

The text is correctly being displayed but it’s ALWAYS being displayed. I would like it to be displayed ONLY when it enters the triggerbox and undisplay it when outside.

Then look at F_Innovations’ answer. You need to connect Draw to the Gate so the gate has a chance to control something in the first place.

It fires on tick so it should draw. But that gate is doing absolutely nothing here, true…

Hey guys,

As you said, it was a GATE issue. I’ve corrected it and it works like a charm !

Thanks for your help!

All the best,

Thank you for your answer, you’re right guys, I connected the gate and it correctly works !

Thanks for your answer!

Is there a reason why you’re using the HUD class for this in the first place? Every time there’s an engine update I fear HUD is going to be deprecated.

Almost certain at this point it’s not making it into UE5…


Tbh, it must be the first time I’ve seen HUD hooked up to a BPI :smiley: