How do I make counter

Get help using Construct 2

Post » Mon Aug 01, 2016 4:18 pm

how i can let counter stay counting even after closing a game ?
B
55
S
18
G
10
Posts: 209
Reputation: 8,546

Post » Mon Aug 01, 2016 6:20 pm

Many options are explored in this thread: viewtopic.php?f=147&t=179942

There is one more I just found, in that there is a Timestamp expression in the Geolocation object that gives you UNIX Time based on your system time. While your game is running, save this to a variable/localstorage, then on start, you can get the UNIX Time and compare what the difference is from your saved value to make adjustments accordingly. Haven't experimented with it yet though, it seems like there may be some delay issues when requesting geolocation. The methods in the linked post should be more certain.
Mistakes were made.
B
52
S
26
G
109
Posts: 1,613
Reputation: 61,647

Post » Mon Aug 01, 2016 6:36 pm

Can you write event and action or send capx. For example
B
55
S
18
G
10
Posts: 209
Reputation: 8,546

Post » Mon Aug 01, 2016 11:10 pm

https://www.dropbox.com/s/o46ix3solka3x ... .capx?dl=0

Disclaimer: This uses an AJAX request to a third party website, which may or may not be available in the future. Also in consideration of this free service, avoid making an AJAX request every tick.

For a local solution, you may want to use rex's date/time plugin instead. https://dl.dropboxusercontent.com/u/577 ... _date.html
Mistakes were made.
B
52
S
26
G
109
Posts: 1,613
Reputation: 61,647


Return to How do I....?

Who is online

Users browsing this forum: Armench and 16 guests