0 Favourites

How do I Save a game and have it record play time

  • Such as this if ive been playing for one hour and then hit save id like to see a load and that save slot to show up as save 1 : 00:01:00 as in dd:hh:mm ? I dont think Anyone covered that one yet ?

  • Create a start and stop timer event so the timer only runs when the player is running the game (e.g., is not in the main menu or in pause mode). Include the timer variable into your save game slot name.

    Check this tutorial out:

    That should do it!

  • Use a time plugin or function and look at these very basic save events, could probably be evented more elegant, but it will do the job.

    Example used every 1 sec for seconds, which is not recomended.



  • i love both of you guy example and I will use both in a way but i have to ask what does the Percent sign do in java math ?

  • % is the modulus operator, mod on your calculator. It divides the number by the second and returns the remainder.

    5 % 2 = 1

    If you count your time in seconds and you have 5624 seconds, you can find how many minutes there are by doing floor(5624/60) and how many seconds by doing 5624%60.

    It is VERY useful when calculating angle of direction, time, currency... anything that loops back to zero.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Oh cool I wished id known that many year ago. I remember having to do the counter by manual as in frame count to change the next number it was crazy.

    But yeah Im having a new problem The save n load works fine For one time and then it start to lose it text ....load buttons.

    Im confuse to why its doing that. If any can find that one.....Why would it work once but then falls apart. here the capx. It will auto download. Note: the battle isnt ready yet so dont go testing it lol

    Oh And Id like to ask for input for the music volume if you guy think its too loud ?

    The save n load function is being weird on me. The codes are on Start menu, UI and save time event sheet. and yes I tried to separate them to make easier of finding.

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