How do I calculate time?

Get help using Construct 2

Post » Sun Mar 08, 2015 3:10 pm

how do I calculate time,I mean if I want to make that if the player don't open the game for 24 hours,it will send you a notification to open the game.i already have the notification plugin,I want to know how to calculate time
B
15
S
4
Posts: 153
Reputation: 1,385

Post » Mon Mar 09, 2015 3:17 pm

Take a look at this tutorial:
https://www.scirra.com/tutorials/940/ho ... -a-project

The information in the tutorial will give the browsers date/time value. You could also use the Javascript command Date.now(), which will give you the browsers current time stamp in milliseconds. This value can be easily tested to see if more than a day has passed by getting the difference between the stored time stamp and the current time stamp and converting the result to hours (int(result / (1000 * 60 * 60)))
B
38
S
12
G
11
Posts: 329
Reputation: 7,708

Post » Mon Mar 09, 2015 6:31 pm

Thx so much frag father,you solved my problem
B
15
S
4
Posts: 153
Reputation: 1,385


Return to How do I....?

Who is online

Users browsing this forum: hsetiawan, mardavlet and 21 guests