Reset Score each day

I`m looking for a solution to reset scores and levesl each day.
How could be done with device clock?

Comments

  • TheGabfatherTheGabfather Member Posts: 633
    edited April 2013
    You can have a scene that fires a Rule which checks if the current device time is greater than a previously saved game time by a day (you can work with game.Clock.day and game.Clock.month). Each time it successfully resets the score, you should also save the current time and use that to compare again the next time the same scene is reloaded.

    Make sure to address issues like when a new month starts, Day 1 this month will be less than say, Day 31 of last month. You will be working with integers, so it shouldn't be too hard :)

    Consult this video from the CookBook channel if you haven't yet
  • mrpacogpmrpacogp Member Posts: 400
    Thank you very much.
    I want to watch the video for compare with my solution, similar of what you say.
    You know why mount on android is one less than the real?
    If i use device month i get 3, instead of 4
Sign In or Register to comment.