How do I timer that does not stop

Get help using Construct 2

Post » Mon Jan 26, 2015 10:34 am

I have the code:
every x second - add 1 to timer.
When "timer" is variable.
But when browser tab loses focus, the timer stops.
How to make sure that it does not stop?
B
3
Posts: 2
Reputation: 179

Post » Mon Jan 26, 2015 4:22 pm

Make sure Pause on Unfocus is set in the project settings.
B
49
S
16
G
9
Posts: 1,098
Reputation: 11,222

Post » Mon Jan 26, 2015 5:51 pm

spongehammer wrote:Make sure Pause on Unfocus is set in the project settings.


as it is said inthe decription of this setting, it is preview only.

try to set a variable to wallclocktime (it is a system expression) on the start of your timer, then just check the difference between that variable and wallclocktime to have the number of seconds since you setted the variable.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Thu Jan 29, 2015 3:05 am

Aphrodite wrote:try to set a variable to wallclocktime (it is a system expression)

Thank you! What the doctor ordered.
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 38 guests