Adding time to team_round_timer in arena

Discussion in 'Mapping Questions & Discussion' started by Fragancia, Nov 1, 2013.

  1. Fragancia

    Fragancia L2: Junior Member

    Messages:
    83
    Positive Ratings:
    29
    Hey guys, I wonder if any of you know why you can't add time with a team_round_timer on a round that's currently going in arena?

    It seems to work after any team wins, but that's not what I'm after.
     
  2. Fragancia

    Fragancia L2: Junior Member

    Messages:
    83
    Positive Ratings:
    29
    I feel I haven't elaborated on what my issue is, so allow me explain further, I have 2 control points in this temp map of mine, 1 cp, if capped should add time to the timer but it doesn't.
    I've tried using ent_message_draw and it does actually say it added the time but the time doesn't show up on the HUD for players to notice.

    So I tried making 2nd cp if capped, team that captured it wins the round and also making the team_round_timer add time on cap.

    This is what happens I cap 1st point
    http://steamcommunity.com/sharedfiles/filedetails/?id=191025774

    And 2nd point
    http://steamcommunity.com/sharedfiles/filedetails/?id=191024579

    Does anyone know why that happens or how to work around it?
    If you're interested, I could give you the .vmf or/and .bsp.
     
    Last edited: Nov 2, 2013
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,531
    How are you adding the timer? Arena doesn't usually have one, so... there might be some kind of inherent conflict. I also have the HUD overlap if I try to put a timer in with arena mode so I'm a little confused what you have going on.
     
  4. Fragancia

    Fragancia L2: Junior Member

    Messages:
    83
    Positive Ratings:
    29
    I use a point_servercommand, logic_auto and tf_logic_arena to avoid the timer overlapping the player counts

    Logic_auto

    Column 1 Column 2 Column 3 Column 4 Column 5
    OnNewGame Point_servercommand Command tf_arena_round_time 600 0.00
    OnMultiNewRound Point_servercommand Command tf_arena_round_time 600 0.00



    tf_logic_arena

    Column 1 Column 2 Column 3 Column 4 Column 5
    OnArenaRoundStart Point_servercommand Command tf_arena_round_time 0 0.50
    OnArenaRoundStart team_round_timer ShowInHUD 1 0.00
    OnArenaRoundStart team_round_timer Resume 0.50


    Team_round_timer keyvalues:

    Column 1 Column 2
    Start disabled? No
    Timer length 120
    Max Timer 600
    Start paused? Yes
    Setup time 0
    Reset on round restart Yes
    Show Timer on HUD No
    Count direction Down


    Here's the .vmf if you wish to look further into it.

    http://www.mediafire.com/download/k4w8rp9vw9p9b35/Temp_arena_addtime_test.vmf
     
  5. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,531
    I poked around at the entities ingame and it does seem to just be an inherent conflict with arena mode. For whatever reason adding time simply does not work, neither on the built-in timer nor custom ones... as you know.

    However, the SetTime input does work, so I'd suggest using that as a workaround. Set up a math_counter that starts at the same number of seconds as your timer, and sync it with a logic_timer to decrement it 1 each second. When you want to add time, add the value to the math_counter and send it a GetValue and have OnGetValue pass on the new time to the timer via SetTime.
     
    • Thanks Thanks x 1
  6. Fragancia

    Fragancia L2: Junior Member

    Messages:
    83
    Positive Ratings:
    29
    Thank you for helping, I'll get back to you on how it works.
    EDIT - Also, do you know why it adds the time after the round is won? I'm curious to know.
     
  7. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,531
    I don't. It is probably just one of those things that is made that way. Another example being that on a multi-round map you cannot alter the ownership of control points at any time between the end of one round, and five second after the next round starts (when players are unfroze).
     
    • Thanks Thanks x 1
  8. Fragancia

    Fragancia L2: Junior Member

    Messages:
    83
    Positive Ratings:
    29
    It seems to work smoothly when adding time, but when I'm trying to subtract maybe a minute from timer, things start to go not as intended.
    It puts the timer at one minute instead.

    I'm not sure if it's me screwing things up or you can't subtract from the timer at all with settime without issues.
     
    Last edited: Nov 2, 2013
  9. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,531
    You can set a timer to a lower value with that input. Did you follow the numbers in the console to see where it might be going wrong? (you had dev 2 on in your screenshots so you know about that I take it)
     
  10. Fragancia

    Fragancia L2: Junior Member

    Messages:
    83
    Positive Ratings:
    29
  11. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,531
    I'm... not even sure what you are doing there. Way more entities than I expected. I don't think there is any need to have more than one counter, that is just complicating the issue.
    However, there is one key issue. You are assigning a value to the "parameter" for SetTime. Don't do this, it defeats the entire function of the counter. When a OutValue or OnGetValue is fired, the current value of the counter is passed along as the input paramater if it is left blank. So it is getting set to 60 seconds, because you are setting it to 60 seconds.
     
    • Thanks Thanks x 1
  12. Fragancia

    Fragancia L2: Junior Member

    Messages:
    83
    Positive Ratings:
    29
    Oh I see now! I didn't think it did that at all. I haven't messed with a math_counter so I wouldn't know.
    Anyways thanks a lot for your help and enduring with my recent display of stupidity.