Does anyone know how to create a countdown (visible to the player) that will end the game when it reaches zero?
As with everything in Blueprints, you can do this a few different ways. My suggestion would be to use a Timer in your Game Mode. Have it update a UMG Text Block component that displays on the player’s HUD. As that timer updates, you can compare the “Time” to a “Finish Time” variable and when it hits that time, pause the timer and display a message via UMG.
This is just a basic idea, let me know if you have any other questions and I will see what I can do.
I made the same thread yesterday : UMG round timer *help needed* - Blueprint Visual Scripting - Unreal Engine Forumshelp-needed
someone posted a very useful video tutorial, I suggest you follow it and improvise for the last of it
You do not have a function name in your timer. Set your function name to DecreaseTime to match your custom event and set looping to true (check the checkbox), see if that fixes it up for you.
I did that but the timer still doesn’t work.
I noticed in the screenshot you have your timer set to 0.0, which means it is not functional, have you adjusted this to set the point you want the timer to activate?
I changed the number but still nothing.
It looks like the Set Timer node does not have an Asset selected, but your Pause Timer node does (set to “Timer” - the float value), try setting that value to be the same as Pause Timer. Also make sure you spell the custom event name with the same case as the event name since it is case sensitive.
I’ve made sure the set timer node has the same asset selected as the pause timer and the custom event is spelled correctly, yet it still won’t work.
What is the default value for the float “Timer” variable?
Also can you take another screenshot showing the changes you have made please? thank you!
Try connecting the Object input on the timer to a self reference
The timer still doesn’t appear.
The Pause Timer node near the bottom does not have the FunctionName set, set it to DecreaseTime just like the Set Timer node above.
Also your Create Game Over Widget has no OwningPlayer selected.
Go through each of the nodes and make sure you have all of the inputs required set up, and then try again.
Make sure you have placed the Timer BP in the level
If that doesn’t work then please migrate the BP so we can look at it
How do I migrate the BP?
Right click - Asset Actions - Migrate
Here is the countdown BP and the timer widget.