Game over screen (save time)

gilamonstergilamonster Member Posts: 31
edited November -1 in Working with GS (Mac)
GS peeps, new to GS, but I am stuck on how to save the (amount of time it took for the player to complete the game) only on the game over screen. I can display the time on the game over screen, but it starts from 0 and keeps counting up when it switches over to the game over screen, I am using game.time as my timer. Any ideas? Thanks.

Comments

  • joshmiller602joshmiller602 Member Posts: 206
    Use the Save Attribute feature to save any data, and use Load Attribute to load it in.

    If you are new to GS, i would HIGHLY recommend getting the Gamesalad Handbook from Photics (a user on here)...it helped me out A LOT when I first started with GS. It's cheap, easy to read, and will save you HOURS of time researching stuff on here. I don't have a link to it, but it is called "The Unofficial Gamesalad Handbook" I think.

    Good Luck Gila :)

    - Josh
  • MotherHooseMotherHoose Member Posts: 2,456
    @gilamonster

    if I understand... you want the game to store the startTime and note the playing time and display the difference...

    create a game Attribute name it startTime (real type)
    create a game Attribute name it currentTime (real type)

    on the button or whatever you use to initiate gamePlay have a changeAttribute startTime = game.Time
    on the change to gameOver screen have a changeAttribute currentTime = game.Time
    (game.Time is entered as an expression)

    in the screen area for the playTime Display Text [expression] currentTime-startTime

    MH
  • gilamonstergilamonster Member Posts: 31
    Josh, thats dude, helped me out!! game is almost done, got the book also, good read!!!
  • gilamonstergilamonster Member Posts: 31
    MH thanks for the info, good stuff!!
Sign In or Register to comment.