How do I add a clock system for getting life

Get help using Construct 2

Post » Mon Nov 10, 2014 2:34 pm

so im trying to add a clock system to my game through which the player will get 1 life back after every 30 mins.

I dont know how to do it.

SO a lil help. will be appreciated.
B
6
S
1
Posts: 24
Reputation: 452

Post » Mon Nov 10, 2014 3:37 pm

.... :D
You do not have the required permissions to view the files attached to this post.
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Mon Nov 10, 2014 5:00 pm

will it play even if the game is not running........?
B
6
S
1
Posts: 24
Reputation: 452

Post » Mon Nov 10, 2014 5:05 pm

Don't worry... certainly not
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Mon Nov 10, 2014 6:03 pm

I will be specific this time......


so im trying to add a clock system to my game through which the player will get 1 life back after every 30 mins.

for example like in candy cush. the person gets 1 life back after every 15mins. even if the game is not running on the phone.
I dont know how to do it.

SO a lil help. will be appreciated.
B
6
S
1
Posts: 24
Reputation: 452

Post » Tue Nov 11, 2014 4:05 pm

You maybe can host a php script on a website which simple gives you back the time (or use any free ntp service). Before closing the app a timestamp can be stored in the game/app and after opening the ntp server/php script is asked about the time and the difference can be calculated.

That should work but'll need an internet connection.

Regards,
Proxymity
B
24
S
14
G
9
Posts: 118
Reputation: 6,799

Post » Tue Nov 11, 2014 9:33 pm

we did this with ajax call and php.

I'll see if i can find the files tomorrow :)
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Wed Nov 12, 2014 8:11 am

@xanxion well thanx in advance.

and im waiting.:-)
B
6
S
1
Posts: 24
Reputation: 452

Post » Thu Nov 13, 2014 9:24 pm

Hi akashlakhotia,

Unfurtunatly i dont have the files anymore, but i think rex gave you another solution in another thread?


Good luck! :)
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Sat Feb 28, 2015 8:05 pm

Message: LoneWolfe007 can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
I looked to see what the forum posting rules were and I couldn't seem to find anything about posting on a post that hasn't had anyone talk in a few months so I decided to post anyway, if it was wrong to do so please let me know.

Unfurtunatly i dont have the files anymore, but i think rex gave you another solution in another thread?


I think I found the forum post you are talking about located here: plugin-system-date-and-time_t63492?&hilit=clock&start=100. Is this method a way to stop the simple changing the clock way of cheating? After doing some searching I found a few more posts on the forum which talked about fetching the time from a website like http://www.time.gov/ and then having the game figure it out from there. Is that potentially a way to stop the changing the mobile time? Thank you in advance for your help.
B
8
S
2
G
1
Posts: 19
Reputation: 608


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests