How To Make A Timer Pause

TheDmanTraversTheDmanTravers Member Posts: 22
edited November -1 in Working with GS (Mac)
Hi Im Making A Game Were You Hold Down For As Long As YOU CAN So Im Using A Timer And When I Let Go I Want The Timer To Stop

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    Do you just need to know the duration of the Hold Down?

    if so
    gameAttribute real type named startTime
    gameAttribute real type named endTime

    on Actor to be held down
    [Rule] when touch is pressed
    --changeAttribute startTime = game.Time

    [Rule] when touch is pressed
    --changeAttribute endTime = game.Time

    wherever you want to display the duration
    Display Text [expression] game.endTime - game.startTime

    MH
Sign In or Register to comment.