Stopwatch! Can't find this anywhere

amigoniamigoni Member Posts: 78
edited November -1 in Working with GS (Mac)
I looked everywhere and I feel a little dumb asking but How do I make a stopwatch?

I am trying to use the time variables but they don't seem to reset to 0 when I asked them to. Neither the game or the prototype variable.

I am trying to have a character start a timer when he collides with and object and stop the timer when he collides with another while displaying the time all along.

Please help.

Thanks

Comments

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    You can't modify game OR actor time attributes at runtime. You can constrain them to your own real attribute and then do whatever you want with it. Example:

    Change: game.myTimeOffset to game.time

    Constrain: game.myRunningTime to `game.time - game.myTimeOffset`

    Just repeat step #1 anytime you need your running time reset to '0'...
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I have a demo on my wall that explains how to work with time in GameSalad. Feel free to dig through it.
  • PhoticsPhotics Member Posts: 4,172
    amigoni said:
    I looked everywhere and I feel a little dumb asking but How do I make a stopwatch?

    The Photics: Toolbox has a stopwatch. It basically converts game.Time to an angle.
Sign In or Register to comment.