How do I make a counter that works when game is locked

Get help using Construct 2

Post » Wed Oct 19, 2016 1:44 pm

I wanna make a counter that keeps running even if the player locks the screen or the game loses focus. " Every X seconds " stops working as the gamefocus is lost or screen locked. Is this possible?
B
5
S
1
G
1
Posts: 6
Reputation: 839

Post » Thu Oct 20, 2016 1:20 am

You can't have events running when the game is off of the screen. You could use this plugin to record the time when the game loses focus (event Browser:On suspended). Then when the player returns to the screen (event Browser:On resumed), just compare the time you recorded to the current time to get the amount of time that has passed.
Note: I am not active anymore. If you need to reach me for one of my games, you can do so by emailing me at [email protected]
B
63
S
25
G
8
Posts: 36
Reputation: 8,443


Return to How do I....?

Who is online

Users browsing this forum: work3 and 6 guests