How do I Determine how many days since last launch ?

0 favourites
  • 11 posts
From the Asset Store
Action packed 2 track pack for use in your projects
  • is there a way to detect how many hours [actually I just want to know how many days] since the last time the game was opened ?

  • I think you can obtain system date/time through a plugin or simple expressions (i'm not sure about this last).

    First, set the date and time in a persistent data like local storage everytime the app's closed. Then when the app is opened again, calculate the hours/days difference between current and stored time.

    Sorry about my english D:

  • You want this on a global basis or a per-user basis?

  • Per user.

  • I think you can obtain system date/time through a plugin or simple expressions (i'm not sure about this last).

    First, set the date and time in a persistent data like local storage everytime the app's closed. Then when the app is opened again, calculate the hours/days difference between current and stored time.

    Sorry about my english D:

    You have been very helpful.

    The next question is, how to retrieve the date time in an easy to calculate way that allows me to easily calculate how many 24hours have passed since last launch ?

  • Toddler

    Please don't multipost the same topic in different sections.

    I've merged the posts and removed the duplicate.

  • You have been very helpful.

    The next question is, how to retrieve the date time in an easy to calculate way that allows me to easily calculate how many 24hours have passed since last launch ? <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    You can use Rex's date plugin: c2rexplugins.weebly.com/rex_date.html

    I haven't tested it yet but it seems very good and easy ^^

  • The minute I use it it reports an error, I wrote in his discussion thread, hope to hear from him soon.

    You are very helpful josek5494, thanks !

  • > The next question is, how to retrieve the date time in an easy to calculate way that allows me to easily calculate how many 24hours have passed since last launch ?

    >

    Do you care if your date and time can be manipulated by users? And do you need to translate these times between users or do you only care that a given user can see his own time played/last time the client was updated?

  • The last one !

    WOW you are detail ! I am so going to be helped ! Thanks !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • >

    > > The next question is, how to retrieve the date time in an easy to calculate way that allows me to easily calculate how many 24hours have passed since last launch ?

    > >

    >

    Do you care if your date and time can be manipulated by users? And do you need to translate these times between users or do you only care that a given user can see his own time played/last time the client was updated?

    Nice tips xD helpful for me too ^^

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