Count down time even when not in the game

Get help using Construct 2

Post » Sat Jan 19, 2013 8:05 pm

I was wondering if there is a way to continue to count down the time passed even if not currently in the game. You know, like in most of the games where you have energy and it need some time to refill, or you need 7 hours to build a building, so you turn of your computer, do stuff, and then come back and it is built.

I tried to find the answer to this question, but could't sorry if there is another one like this..
B
10
S
1
Posts: 10
Reputation: 1,446

Post » Sat Jan 19, 2013 8:21 pm

I'm no pro but, I think maybe when you start the game it checks a server then adjusts the stats for time passed.
B
66
S
23
G
11
Posts: 452
Reputation: 12,077

Post » Sun Jan 20, 2013 4:36 am

I'm not near a computer, so I can't check if C2 has access to the current date/time (I know JavaScript does), but that would be an easy way, save for people changing their system clocks.
B
103
S
38
G
19
Posts: 962
Reputation: 17,986

Post » Mon Jan 21, 2013 11:44 am

Maybe if I could somehow make a variable look for an online clock? That should be possible, but I haven't tried anything like that so far, do you have any idea how?
B
10
S
1
Posts: 10
Reputation: 1,446

Post » Mon Jan 21, 2013 2:07 pm

It can easily be done in a plugin using the getTime() Method.
Moderator
B
72
S
14
G
11
Posts: 900
Reputation: 11,910

Post » Mon Jan 21, 2013 6:50 pm

Can you tell me which plugin?

Btw, I saw your game, can't wait to try it! :)
B
10
S
1
Posts: 10
Reputation: 1,446


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests