Windows A question about showing the time and date, request help

Discussion in 'GameMaker Studio 2 Community Tech Support' started by hykwf233, Jun 1, 2019.

  1. hykwf233

    hykwf233 Member

    Joined:
    Jun 1, 2019
    Posts:
    3
    Hello everyone, I am yuke.
    I have a savegame and loadgame feature in my game, but I want to display the time and date of the archive when savinggame and loadgame. How do I implement this feature?
    Please give me some help, thank you~
    The effect is as follows:
    [​IMG]
     

    Attached Files:

  2. jonjons

    jonjons Member

    Joined:
    May 10, 2017
    Posts:
    293
    You can look into this function in gm, it will give the current date and time
    date_datetime_string(date_current_datetime());
     
  3. hykwf233

    hykwf233 Member

    Joined:
    Jun 1, 2019
    Posts:
    3
    [QUOTE =“jonjons,post:382370,member:17083”]你可以在gm中查看这个函数,它会给出当前的日期和时间
    date_datetime_string(date_current_datetime()); [/ QUOTE]

    So how do I display the last archived time on the interface of loadgame?
     
  4. jonjons

    jonjons Member

    Joined:
    May 10, 2017
    Posts:
    293
    You need to use the draw event, but if you are using a menu you need to place it in the part of the menu were it shows the load game files

    draw event
    Code:
    var saveDay = date_datetime_string(date_current_datetime());
    draw_text(x, y, "This is the Save Date: " + string(saveDay ));
    
    [edit] why are all those chinese characters in your quote has my data been hacked again ?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice