Subtract from running timer

● ARCHIVED · READ-ONLY
Started by HalcyanStudio 2 posts View original ↗
  1. Never had to do it and thought it was gonna be easy, but can't find it how to do it easy, so let's see if someone in the community has already done this: Is there a way to manipulate a running timer? E.g. timer is at 10:00, when the player touches a certain event, 1:00 should be subtracted, and then keeps running.

    How's the easiest way to do this?
  2. I'd say this

    Code:
    class Game_Timer    #-----------------------------------------------------------------------------  # Adds the specified number of seconds to the timer.  # Provide a negative number to subtract time.  #-----------------------------------------------------------------------------  def add(secs)    @count = [@count + secs * Graphics.frame_rate, 0].max  endend
    script call:

    Code:
    $game_timer.add(numSeconds)