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.
Check out my online game Space Arena at space-arena.com!
B
61
S
24
G
7
Posts: 36
Reputation: 7,784


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests