Continue counting while changing browsers tab

Get help using Construct 2

Post » Mon Dec 17, 2012 11:26 am

Hi!
Is there a way i can continue counting while i change browsers tab (game lost focus)?
B
19
S
3
G
5
Posts: 98
Reputation: 4,647

Post » Mon Dec 17, 2012 12:42 pm

Not really - most browsers reduce the game to 1 frame per second for inactive tabs, and Construct 2 just pauses the game in that case to prevent games proceeding while the user is not looking at the game. You could use the Browser object's 'On suspended' and 'On resumed' events to detect this happening and work out how long has passed since suspending.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Mon Dec 17, 2012 12:48 pm

ah i see...thank you Ashley
B
19
S
3
G
5
Posts: 98
Reputation: 4,647


Return to How do I....?

Who is online

Users browsing this forum: kamens503 and 20 guests