Timer and pause game

patapplepatapple Member Posts: 873
edited February 2012 in Working with GS (Mac)
hi,

i create my timer with this tutorial and it works fine:

but now my problem is, when i pause game i see the timer stops, but when i unpause game, the timer is not correct (the time is less than it should be)

how can i fix it???
thanks

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    edited February 2012
    as TSB said … this method resets the myTimer for every scene …

    if you just want to track/limit the total time the player has to play:
    you don't need the startTime and myTimer attributes

    on your timePlayedActor (in addition to the displayText):
    Rule: when
    Attribute: game.Time = 1200 (that is 20 minutes of play x 60 seconds/minute) … suggest you try with = 10 first!
    --game over stuff

    @};- MH
  • triton13triton13 Member Posts: 161
    How can you make it so it doesn't have hundredth or thousandths of a second?
  • MotherHooseMotherHoose Member Posts: 2,456
    in the second white square with down arrow in the expresionEditor: … the functions that you can use

    floor … selecting this puts floor(x) in the editor
    highlight and replace the x … with something else you select … don't replace the (  )
    EX: floor(game.Time)
    floor rounds down any number with-in the ( )
    ceil rounds up any number with-in the ( )

    in ExpEdit … you can also 1st select an element EX: game.Time … then type in the floor(  ) around it
    do not forget the brackets ( ) …

    @};- MH
Sign In or Register to comment.