Make a timer to unlock content

0 favourites
  • 5 posts
From the Asset Store
Unlock Levels, Worlds & skin plus add coins by watching ads
  • 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?

  • 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..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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?

  • 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..

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)