How to pause everything except GameInstance?

How can I pause everything in the game except the GameInstance?

This is a mobile game so it also should be a cheap method.

Custom time dilation for each actor is an expensive method but it doesn’t work for me because GameMode doesn’t get affected from CustomTileDilation variable. I use GetGameMode node and connect it to SetCustomTimeDilation(0) node but it doesn’t actually set it.

So, I can pause everything except GameMode and GameInstance but I can’t pause GameMode with this method. It probably doesn’t implement CustomTimeDilation varibale correctly, it looks like a bug.

Well, there is something like “execute console command” and write there “slomo 0”, but I’m not sure about results for game instance.

BTW: Why bug reports?

slomo 0 is also pausing GameInstance too.

I was a little bit sleepy last night so I forgot to write the bug. I added it now, thanks for reminding.

You can check Tick on Pause in actor I believe.
And than use Pause game, not setting time dilation to 0.

Unfortunately that option does not exist in GameInstance class.

I am sure GameInstance does not have Tick at all. In our project we “tick” gameinstance form GameState.

Yes GameInstance doesn’t tick every frame by itself but there are timers inside GameInstance that are ticking.

For example there is a socket connection module inside it. It should send connection validation to server every 5 seconds, fired by a timer. But that timer doesn’t fire if I pause the game or set time dilation to 0.

I will try ticking from GameState.

I just tried your suggestion. But it didn’t work out.

  1. I set GameState as ticking even when paused.

  2. Fired event from GameState every second.

  3. Followed the string printed from GameInstance.

Result: Timer in the GameState stops when I pause the game.

EDIT: I managed to get it fired by using it inside Event Tick. I added WorldTickTime to a float and every time it exceeds 5, I fired the event and works fine now. Thanks for your help! :slight_smile: