whats the best way to make a "is a less than" Highscore

fedifedi Member, PRO Posts: 31
edited June 2012 in Working with GS (Mac)
Hi,

i making a game where the highscore is the best Time.
what i have so far, at the end it change the time to game.timewin
than if game.timewin is less than game.timehigh save game.timewin
but game.timehigh is at the beginning 0 so have changed the game.high to 10000 , and seems to be working.
but dont know if this is the best way to do it or is there a better way ?

Answers

  • Fabri DamazioFabri Damazio Member Posts: 97
    Attributes:

    game.actualtime
    game.besttime

    At the end of level:

    If game.actualtime < game.besttime
    game.besttime = game.actualtime
    Save game.besttime


    Before start the level:

    Load game.besttime


    In this way the time to be beat always will be the game.besttime
  • fedifedi Member, PRO Posts: 31
    Ok. But at the beginning the best time attribute is 0. So i would be always lower
  • SingleSparqSingleSparq Member Posts: 1,339
    Add in a rule to only work if best score does NOT equal 0
  • fedifedi Member, PRO Posts: 31
    no i have tested it and dident worked, ore im doieng something wrong. But i think i have seen in a video the best way is to make the time counter negativ, and use the normal rule if greater than. i will test this
  • fedifedi Member, PRO Posts: 31
    im using this tuturiol from @tshirtbooth in my game but i want that the lowest time is the highscore. any ideas ? thx
Sign In or Register to comment.