How can I create a timer that counts down on the screen?

Hello,

I’m relatively new to programming and using Blueprints. I’ve gone through this series How to Make Pong In UE4 | Part 1 | Setting Up the Project - YouTube and my game works perfectly. Now I’m going through and trying to add my own stuff to it to get better at coding/using blueprints.

I’m having a lot of trouble trying to get a timer working that goes “3, 2, 1, GO!” in big letters on the screen.

or instead of a timeline, you could set a timer function:

30655-countdowntimer.jpg

Thank you for the quick reply.

I’m unable to locate “Event Receive Draw HUD.”

its in your custom Hud class. if you make a blueprint based on HUD, it should be available in its event graph, along with DrawText.

Okay so it looks like things have been moved around since this video was made, but everything is there. I think I’m starting to understand it now.

So HUD looks like it’s completely independent. Apparently I have no HUD and have to create my own (what’s stated at the beginning of the video).

I will update you with my progress later.

So I was able to get my text to draw, but it was printing negative values starting at zero.

that sounds like you didn’t set the default value of an integer. if you follow the first image i posted, you don’t even need an integer, you just set a string with literal values. that way, you can display the word GO using the same functionality as displaying the numbers, and in the future, if you want to change the code to say “Round 1, Fight” or “Ready, Steady, Draw” you can easily change it.

Hey Man,

Yeah, the default value completely slipped by me. I was so happy to finally figure it out. I got it working. I really appreciate your help. Thanks.