How do I add a clock system for getting life

0 favourites
  • 10 posts
From the Asset Store
Customize the animation of character when item changed
  • 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.

  • ....

  • will it play even if the game is not running........?

  • Don't worry... certainly not

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

  • 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

  • we did this with ajax call and php.

    I'll see if i can find the files tomorrow

  • xanxion well thanx in advance.

    and im waiting.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi akashlakhotia,

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

    Good luck!

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

    [quote:ppp7edb2]

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

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