Pausing timers

Discussion in 'Mapping Questions & Discussion' started by zahndah, Sep 20, 2015.

  1. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    Is there a way to pause a timer halfway through timing then unpause it to pick up where it left off?
    I need to use this to fix a bug for my map but have no idea and after testing 'toggle' and 'enable / disable' it seems they all reset the timer.
     
  2. saph

    aa saph crossword blues

    Messages:
    167
    Positive Ratings:
    311
    I know that you can pause timers for KotH (/pausing-the-koth-timer.25763/), so it should be possible for cp_mcmurdo depending on your entity setup. I'd need to look at and play around with your entities or you could set it up as a multi-point KotH. What is the base gamemode you are using and what is the timer entity? (Use the trigger_capture_area to pause whatever timer you're using.)
     
  3. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,745
    logic_timer will reset after a restart

    team_round_timer will not. I haven't tried using multiple timers at once, but it may well be possible to use many as long as they're all hidden from the hud. You can mark them as silent so the announcer doesn't say anything either. Then use pause/resume for accurate pausing.
     
  4. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    I have the team_round_timer pausing when a player is on the point but it isn't directly linked to the changing of the points, would i have to link it to be able to stop what is happening. To be more specific, since it isn't linked, if a player stands on the point but doesn't cap the timer says 'X seconds before points switch' but then the point switches. I could probably link it but id have to do some testing. I will try now.
     
  5. saph

    aa saph crossword blues

    Messages:
    167
    Positive Ratings:
    311
    Try using OnStartCap to pause it. When the player enters the trigger_capture_area, the timer will pause. Then try OnBreakCap (if someone blocks them or if they die) and/or OnEndCap (if they capture the point) to unpause the timer.
     
  6. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    i had that but if they just step off the point it doesn't unpause and if the point is partialy capped and they step on it doesn't pause with the onstartcap. it should be fixed now but i will have to do further testing.