2 timers, allow 1 to run while game is paused?

Just “Set Visibility → False” in its place and then you can execute the rest of the code! Then you can put that at the end.

Okay I think I see the big thing. It looks like you need to take the “TimerCount” Set timer by Function Name off of begin play on your GM. Because it’s starting when the game mode starts existing, which is BeginPlay. Give it it’s own Custom event instead of begin play, that the main menu widget will call on, on that button press, before the widget gets removed.

Then, It looks like it’s set up right… I think.

Change that and let me know what happens! :slight_smile:

Will do. Checking right now

Ok, so I hooked the timer to its own CustomEvent:

Then in the HUD (widget) I call the function like so…

Now when I click Play, I get the PrintString… “Event Dispatched”, but the widget animation is not played and the GM counter starts ticking, and the word Go starts fading in and then out. But the widget Play animation is skipped completely, and the game seems to have unpaused right away

Feels like it’s missing a delay somewhere… The StartCounter is not counting down at all.

Now hold on there, you changed a lot more things.

What about when things were still like this in these spots:

image

image

I was still banking on the “Call Hide Big Counter” going off AFTER the start timer finished, and then THAT starting the “GoGoGo” line.

One thing at a time though, don’t worry about whether the player can move. Don’t try to do everything at once or you will get all jumbled! Right now is timer time, focus is the name of the game!

@Mind-Brain Oh, I thought we won’t need those anymore… I can plug them back in real quick :slight_smile: did not delete them just got them off screen

So should I call the StartCounter after GoGoGo???

So looking back through this I’m noticing only one counter. Can you show me your 1 minute game time counter?

Edit: NVM I found it! You should run the “Countdown Timer” Function as part of “GoGoGo”

image

Sure, It’s in the GameMode called CountdownTimer (function). I posted it above in the GameMode section called after a 1 sec delay

function:

Edit: NVM I found it! You should run the “Countdown Timer” Function as part of “GoGoGo”

No, that’s the level timer. I want that one to only start after the 3,2,1, Go timer. The GoGoGo should kick start the 3,2,1 and once the game is unpaused… start the 1min level timer… at least that’s how I was thinking it

Keep in mind, I really just started digging into blueprints about 2 months ago. So please be gentle :grinning:

My thinking was… that once the game is unpaused the 1min timer will start automatically (being in GameMode on EventBeginPlay)… so I wouldn’t have to worry about that… but Since I’m pausing the game in GM, the other counter is not working either :slight_smile:

Right, so that’s the issue. Pausing literally means nothing gets to use time, so you can’t use that.

What I’m thinking here is:

Start Counter/TimerCount EVENTS is your 3,2,1. After that finishes, it clears the timer and calls “Hide Big Counter”. This starts GoGoGo, which should be when your player gains control and starts the level. That part looks good. Now we gotta keep that other timer from ticking until it needs to.

OK! SOOOOOOOOOOOO what we’ll do here is use a branch! Make a variable in your gameMode called “Level Timer enabled” or something. Make it False by default. If it’s true by default it won’t work.

Then put a branch before the Delay on your tick, with that boolean as the input.

Then, as part of GoGoGo, “Set 'LevelTimerEnabled” or whatever you called it to “True”. NOW your level timer can tick, where it wasn’t allowed to before!

Edit: Also make sure the branch only outputs to the counter function on “True”, and false leads to nothing.

GoGoGo is actually the animation of that counter in the widget. Where a text box is bound to a function:

Once that part is done… I want the level timer to kick in… the problem is that for as long as the LevelTimerVariable is set to False… the other timer (GoGoGo aka 3,2,1) won’t tick either

Do I place it before or after I Set Game Paused??? does it matter??
Do I set it To False right away??

Like so???

I’m not seeing any references to the 3,2,1 counter in that level timer function, so it shouldn’t affect the 3,2,1 event in any way?

Keep in mind you have your 3,2,1 as an Event, and your 1 minute timer as a function, which also uses integers instead of a float. They don’t seem to be intertwined in any way.

Make a variable over in your sidebar, on your left by default, not as part of the code. Just like you did with the “CountDown” Float. Compile, click the variable, and then in the details window (right side by default) you can set the default value :slight_smile: Empty check box means “false”

Also to be honest you probably should remove the pauses altogether. They’re not working for you only hindering you. Pause is for “Press start to pause the game” and not really anything else. It stops way more than just what the player can do.

I’m open to suggestions… this was the way I thought it was done… my logic is that of a noob :slight_smile: By all means if there’s a better way I’m all ears (and eyes :rofl:)

But, to play devil’s advocate… shouldn’t the game be paused when the menus are on?

I’m not seeing any references to the 3,2,1 counter in that level timer function, so it shouldn’t affect the 3,2,1 event in any way?

Correct, 3,2,1 is coming from GameState

That’s why the main menu should be a separate level, if you start the level paused it will interfere with beginPlay, which is not good. But also you don’t have to have the level itself paused. You can have a “Ok, GO!” Event that things are listening for if you have things reliant on time that you don’t want to do things yet.

Now what I was saying earlier:



I didn’t fill the whole thing in because I don’t have your functions, but this is what I mean for this part.

That’s why the main menu should be a separate level, if you start the level paused it will interfere with beginPlay, which is not good.

But if I make the MainMenu a separate level, when I load the MainLevel, I still want the game to be frozen until the 3,2,1 counter finishes… so it would still bring me to this point wouldn’t it?

Right, the issue here is that when the game is paused, all code freezes. I’m trying to walk you through a way to achieve what you’re wanting. You can’t pause it and have a timer.

Think of it this way. Imagine any game that starts with a timer:
Mario Kart
SSX
Tony Hawk’s Pro Skater
etc.

The game is running, animations are playing, things are happening. You just can’t GO yet. Once that timer hits 0, the player can go. So you can’t pause the game, you need to think of it in a different way. What is it that you DON’T want to happen? We can start there. HOWEVER. Right now, we’re still trying to get the timer right. So we need to get back on track with that.

Fair enough… I’m trying believe me… got this so far:

Okay! Now, look at the 3,2,1. You have Call Hide Big counter at the end there, but it won’t activate unless your timer’s already ticked out, because your branch won’t let it through until the timer’s at 0!

You said GoGoGo is your animation for the 3,2,1?

What about your level timer? is that animated?

Not animated, 2 text boxes in the same HUD widget that are bound to 2 functions: