Currently, I’m working on an endless runner that will end the game (level) when the time is up. I’ve gone through a lot of tutorials on timers. And I’ve successfully set one up in my HUD but it doesn’t count down. It counts up.
You have a basic problem with your loop. The tick is called every frame, the delay doesn’t really do anything, you have thousands of delays all lining up doing nothing…
Hi, as far as I see your timer should work. I would try to print “Time Min” after setting it in your branch to see were it’s going. And did you set “Time Min” to a value greater than 0 at the beginning?
And instead of counting the time manually I would use the “Get Game Time In Seconds” Node and create a max time variable (the amount of time your game will be running before pausing). Then you can substract those two to get the remaining time. Then you can use the “Division (whole and remainder)” Node to get the remaining time in minutes and seconds.
And it seems to me that you then don*t need an event tick but can use a timer. The difference is that a timer will not be called every tick that makes it more efficient.
Thank you both! I’ve tried both methods and they work well.
Currently I’m using ClockworkOcean process but I need the text to be in a certain font face. Also once it count down hits 0 it continues into the negatives. Could you help me figure those parts out as well?
Sorry, was a bit pushed for time, this is about binding widgets to variables. It will automatically show time remaining, you don’t need to keep printing it out: