Delay (or timer) that works when paused?

when I load a game from pause menu, I want my screen to fade to black and open a level.

So I have a black screen widget, and an animation that makes it go from 0 to 100% opacity in a couple seconds.

so when I load a game, I need to play that animation and give some time for it to complete, so I tried using a delay or a timer and then open the level, but none of those tick when the game is paused.

I also don’t want to unpause the game while the screen is fading out, as my character could die in those seconds.

any way to solve this?

I don’t know if the game instance pauses also. Here’s something about that:

Thanks for this.

So I decided to try something similar and it works, kinda. A bit janky, wasn’t exactly trivial but it’ll do for now

In my game instance:

and in my game state:

only have to make sure to check “tick even when paused” in the game state class defaults

Sadly, this is a single case solution as it depends on calling a custom event back in my game instance.

If anyone can adapt this to a function or something that can be reused in multiple cases, I’d appreciate

1 Like