What is the best way to implement an input timeout?

I would like to get notified if the player does not interact with the game for some time so i can go to standby / pause. Please help.

After receiving any inputs reset a global timer (you could have it in the game instance for it to be accessible anywhere). Once the timer gets to a set amount call standby / pause.

Game Instance



Player controller

2 Likes

Thanks. Is there a way to get notified in case of any input to the enhanced player input system? Thinking of a solution where i don’t have to reset the time on each action.

Not that I know of. There is no bind event in the enhanced input.
Oh and you’ll need to extend the clear function to actually reset the timer once it’s done. Otherwise it won’t start counting again (just did a test run without the actual pause)

1 Like