Circular Timer - Pause the Timer?

millerbrother1millerbrother1 Member Posts: 108
edited November -1 in Working with GS (Mac)
Anyone have any idea how to pause the timer in FireMapleGame's Circular Timer Demo? It's a great little timer that can be set to countdown from any number in visual fashion. I have a Game Attribute called game.PauseGame. When it is true all game movements stop. The game.timeLeft Attribute stops (which I've created to count down every second in numeric format). However, FMG's demo doesn't have a direct dependency on an exact number so it is really difficult to imagine how I might stop the animation from continuing.

Any thoughts?

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    That demo was more of a proof of concept to show how to stack the actors to pull off the illusion...

    Right now that demo uses Interpolate, which is real simple to use, but is a little hard to interrupt...

    To be able to pause it, you'll need to switch to using Timers.

    e.g.:

    Timer every 0.1 second
    -----Change Attribute. self.Rotation To: self.Rotation + 1

    And then wrap that in a Rule:

    Rule
    When game.gamePaused = false
    -----Timer every 0.1 second
    -----Change Attribute. self.Rotation To: self.Rotation + 1

    You'll also have to re-figure out the rotation speed. The above example uses 1, change that number to affect the speed.

    Somebody more math-savvy than me might be able to help you out with the calculations.
Sign In or Register to comment.