How do we make the game end when the timer runs out? we can’t seem to figure out a simple way of doing this using blue prints.
Two options set a timer in your game mode that will trigger an event after a set amount of time. Or track elapsed time by summing the DeltaTime values in OnTick. Test for elapsed time greater than your desired match time then end match if true.
And how do we set a timer that triggers the game to quit in the gamemode?
If you mean quit to menu, just open whichever level is your menu. If you mean quit the game entirely, just use the quit game node, like so:
Nice, could you show me a screenshot of a countdown timer with it quitting the game entirely please? I’m still trying to figure this out.
Thanks.
This quits the game after five seconds:
If you want to display the remaining time on screen, you then need to add this in a widget blueprint:
It updates a variable every second, which you then need to link to a text:
What are the other nodes before the quit game node in the first screenshot? I see it connecting to something off-screen but what is it?
And if I may ask, what type of blueprint class is that quit game node in?
The off screen connection is just to whatever event starts the timer. It could be BeginPlay or something else.
It’s in a player pawn, but you could put it in anything that’s in your world(player controller, gamemode, even a random actor.)
Yeah, I don’t know about this. A shame there isn’t a video on a timer like this. I really need an in-depth video guide on this please.
I tried searching on youtube and there isn’t a single video about a timer that ends the game without a menu.
Blueprints aren’t really my strong-suit.
On a related note, I only remade a timer that Fcb Dev made since that one is the simplest by far. It’s only a user widget blueprint as far as I know.
This video explains timers:
Didn’t really help but thanks anyway.
I actually figured it out, it’s much simpler than I thought, literally a no-brainer.
This Event BeginPlay node goes into a Set Time By Event node, which gives it 60 seconds. It then fires off into a custom event that tells it that this event only has a minute. Once those 60 seconds have elapsed, the game quits.
Other people may have their own way of doing it but this worked for me. I did it in the character blueprint.
That seems to be the thing with Unreal, so many ways to do the same things.




