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
9
Posts: 10
Reputation: 1,271

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
49
S
19
G
7
Posts: 429
Reputation: 8,995

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
90
S
32
G
14
Posts: 935
Reputation: 14,540

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
9
Posts: 10
Reputation: 1,271

Post » Mon Jan 21, 2013 2:07 pm

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

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
9
Posts: 10
Reputation: 1,271


Return to How do I....?

Who is online

Users browsing this forum: Aserak2012, ManuelPerez and 21 guests