Draw Text question

This might be a silly question, but how do i draw or display a simple text to the player in game? Like either to chat box or hud overlay. I tried Draw Text with get hud of controller but it shows nothing. And the Chat UI has no pin to draw text.

Look up the Unreal wiki for UMG. That should point you in the right direction. Just remember that the parent class of your widget needs to be PrimalUI or it will crash.

I don’t wish to create a new widget just for this. Is there a way to use the ark’s existing ones to simply put out a message to players? The simplest kind without creating anything?

Oh well, i tried creating new ui widget, binded the textbox and set public variable to expose on spawn. Then created the widget in my game event and set the text variable to it and added widget to viewport, but ends up the text still doesn’t show. @_@

Well i managed to get it crashing now. The parent is shootergame.PrimalUI like you asked. It says something about private function error in player controller.



This is my setup. Why is it crashing on me during runtime?

HUDs are client only. In your last shot it looks like you try to setup a widget for every player. That’s not how it works. A player needs to set up his own HUD widget. Think of it like the server doesn’t know about HUDs at all.

Make sure the create widget function is called on client and use the “getplayercontroller” node to get a reference to the local player controller.

If you really just want to display a message to each player you can use this big-*** notifications. I don’t know the exact name of the node but I think it includes the name “notification”. You might something if you look around here in the ARK forum.

thanks Kenturrac :smiley: