Update HUD draw text at 1 second intervals

In my blueprint HUD I’m trying to slow the drawing of text on screen to 1 second intervals, rather than every tick. However I’m not quite sure how to do it. Set Timer seems to be the way to go, but that’s looking for a function.

Try using a “Delay” of 1.0f

Thanks for the reply. Delays don’t seem to work in the HUD Blueprint at on the Draw Text node. They work on regular Print String nodes just fine though in the same HUD Blueprint. Not sure why that is though.

Haven’t worked with the Canvas in a long time, but can’t you just create a function in the HUD blueprint that fits your needs and call the timer on it?

:X Or was it only possible to call “Draw Text” from the Main Draw node?

Could you not have a switching bool based on a timer via the pawns tick event?

Unfortunately you can’t add a delay timer to a BP HUD even inside a function :frowning:

Possibly but I’m not that deep yet to really understand. Do you mind explaining a bit or pointing me in the right direction?

So this seems really convoluted but I’m just getting the variable on a delay from the Player Controller instead. Then I cast from the HUD BP into the Player Controller. This doesn’t actually answer my question as to how to do it directly in the HUD BP itself (either by delay node or otherwise). But it’ll do for now I guess :slight_smile:

I thought more about something like this:

Create a functioned, for exampled called “DrawMyTestString”, in your HUD Class.

Create your draw text logic here:

http://puu.sh/gFd4m/a192cd4ffd.png

Now, in the Event Graph of the HUD Class, call a timer with 1.0f Second delay and “looping” ticked.
Give this Set Timer Node the Name of the function you have created:

http://puu.sh/gFd2Q/dfe8b49f25.png

This should totaly do what you want :X

Can’t test it though, because i’m missing a font.

Thanks for your response!

I couldn’t get this to work. Even with doing a simplified function (Func start → Draw text). It looks like Set Timer (like Delay) doesn’t work as a HUD event. Which is really weird. Maybe the timing events just aren’t built to work with the HUD BP?

Hello

I was able to reproduce the issue with the delay and the timer. I have written up a report (UE-25253) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. I have also provide and example of one workaround that I was able to come up with. I hope that this information helps. Thank you for your time and information.

Example:

I was able to create a loop with a delay that opens and closes a gate so that the delay is not directly connected to the Event Receive Drawn HUD event which was causing an issue with drawing the texture.

Make it a great day

isnt there a way of creating a material that can cycle textures on a timer, then you can load that into the hud through i widget?