Make a timer to unlock content

Get help using Construct 2

Post » Mon Jun 01, 2015 8:10 pm

Hi. I'm trying to make a timer that can knows how much time has passed since the game was last played/since a variable was changed.

A good example would be Crossy Road which gives a free gift every four hours.

Basic timers only run when the game is open, I need something that runs on system time. Creating a system using the date/time plugin seems way to complicated as you'd need to program it to know how many hours are in a day, how many days in the current month etc.

Can anyone think of a simple solution?
B
11
S
3
Posts: 135
Reputation: 1,309

Post » Mon Jun 01, 2015 8:12 pm

I would suggest using the date time plugin..
It knows the days in a month and the months in a year and the minutes in a day..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jun 01, 2015 8:24 pm

LittleStain wrote:I would suggest using the date time plugin..
It knows the days in a month and the months in a year and the minutes in a day..


Does it really? If I were to check if the current time was greater than a saved time of 22.00 +4 hours, would it know to check for 02.00 rather than 26.00?
B
11
S
3
Posts: 135
Reputation: 1,309

Post » Mon Jun 01, 2015 8:33 pm

It would if you told it to.. Haha..

But Rex has also made a time_away plugin which counts the time since the last session..

Don't know if he's got the Local storage plugin version working yet, though..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jun 01, 2015 8:34 pm

LittleStain wrote:It would if you told it to.. Haha..

But Rex has also made a time_away plugin which counts the time since the last session..


Just beat you to it haha, thanks for the help :D
B
11
S
3
Posts: 135
Reputation: 1,309


Return to How do I....?

Who is online

Users browsing this forum: Fenix18, tarek2 and 53 guests