Making a countdown timer in gameinstance

Hi there,

I have this challenge with making a blueprint setup for a limited play time in my game covering multiple levels.
there is a lobby where the player starts. The player has for example 20 minutes to complete 3 levels. When the time is over the player returns to the lobby. From this point i want the time to reset and restart when the player starts again.

It must be a loop, sound like a boring game, but i like to fix this with a blueprint setup. Right now i created a setup in the gameinstance to avoid the timer to break when switching from level. I get it working, but the challenging point in this setup is staying in the lobby and restart the timer when playing the game. It is now looping.

This is my setup:

What i try to do in this setup, is to send a true boolean signal to the gameinstance when entering the first level. This must open the gate to start the time. As soon the time is over, it must reset the boolean to false and keep the player in the lobby.

The first image is the gameinstance, the second is the trigger actor to start the game. If anyone knows how to make a solid setup that works, let me know. This is my first serious attempt to build a blueprint that interact with the gameinstance, feels like a seriouse challenge.

hmmm i have an idea that may work here that is much simpler but dont have the time to properly test it atm, maybe you could give it a shot. basically you have a timer that gets started when you open the first level, when the timer runs out it opens the lobby level. its dead simple. im not sure how you are handling the opening of the first level but i went with the classic hit a play button in a widget style which would call the startplaytime custom event. in theory it should work.

Update: Did a quick test and it works! for testing purposes i used a 15 second timer and only went to the first level then waited until the timer finished.

Two days of blueprints struggle pain, and you drop this node setup and it works like a sharm :smiley:

So much thanks for this !