How do I get time from the net, rather than system.

Get help using Construct 2

Post » Thu Apr 16, 2015 1:07 am

Been trying to figure out the smartest way to do this, essentially what I'm trying to do, is make it so that players can only do something ONCE a day, as in an actual day, 24h. I could easily pull system time, but I mean if someone really wanted, they could easily just change their time and boom, breaks the mechanic.

Any help would be appreciated, thanks.
B
16
S
3
G
2
Posts: 57
Reputation: 2,078

Post » Thu Apr 16, 2015 3:55 am

You could try an API like TimeAPI, using the AJAX object to fetch the data you need.
Image
B
10
S
3
G
2
Posts: 196
Reputation: 2,053

Post » Thu Apr 16, 2015 3:57 am

Hmmm, I'll try it out. Thanks a bunch.
B
16
S
3
G
2
Posts: 57
Reputation: 2,078

Post » Thu Apr 16, 2015 4:05 am

The best place to get time via an AJAX request is this: http://time.jsontest.com/ - used it before and works well.
B
6
S
1
Posts: 43
Reputation: 536

Post » Thu Apr 16, 2015 4:15 am

Not sure if this'll fit your needs, but you might take a look at this handy plugin: http://c2rexplugins.weebly.com/rex_date.html
B
31
S
9
G
4
Posts: 198
Reputation: 5,054

Post » Thu Apr 16, 2015 9:28 pm

Alright so that http://time.jsontest.com/ worked great, but how do I parse through the AJAX.LastData so I can just get the time and date?
B
16
S
3
G
2
Posts: 57
Reputation: 2,078


Return to How do I....?

Who is online

Users browsing this forum: Aergo, AllanR, anty21ro, Ethan, Fenix18, Iftikhar555 and 11 guests