Math_counters resetting

Discussion in 'Mapping Questions & Discussion' started by x6herbius, Oct 6, 2009.

  1. x6herbius

    aa x6herbius

    Messages:
    377
    Positive Ratings:
    271
    I'm trying to rig up a system in my map where the game ends when one team is three points ahead of the other team, regardless of actual point values. "Points" in this case are just the amount of round that have been won.

    Anyway, to cut a long story short, my system works perfectly except for the fact that my math_counters holding the amount of wins for each team appear to get reset at the beginning of each round, which sort of defeats the point of everything. Through the console I can trigger my logic_relays that are triggered on the capping of the last points and everything increments fine; my messages appear and the game ends when it should. If I capture all the points, next round the message appears saying that both teams are on equal points instead of my team being one up. I know it's not a fault through triggering the logic_relays as if I trigger them manually and then cap the last point, the equal points message still comes up next round which leads me to believe my counters are getting reset.

    Does anyone know of a fix/hack for this?

    Thanks.
     
  2. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    No. Every new round the entity system is refreshed to the default state. Nothing you can really do to bypass it.
     
  3. x6herbius

    aa x6herbius

    Messages:
    377
    Positive Ratings:
    271
    Warpath has counters in place - I've seen the system and tried to model mine around it, except that Warpath ends the game after 3 wins full stop, not 3 wins more than the other team. It still uses counters and ends the game with the OnHitMax output.
     
  4. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    ...which warpath, there are like ten :|

    and the only way I could think of doing that would be by making a multi-round map in which each round is played in the same place.
     
  5. Nutomic

    Nutomic L11: Posh Member

    Messages:
    888
    Positive Ratings:
    177
    There is one way: func_brushes arent reset on new round, so you can create a func_brush, and place a func_physbox over it. Under the func_brush, you place a trigger that reacts on the physbox. In the first round, the func_brush blocks the physbox, and the trigger will not be triggered. But as one team wins, you disable the func_brush, and the trigger gets triggered (can you say that? :D).

    You would need this all three times per team, so for every cap, you disable another func_brush, and as the round starts, you count how many of the func_brushes are disabled.

    You could also make only one physbox per team, and the triggers and func_brushes underneath each other, making a row where the first brush gets disabled first, and so on.
     
  6. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    Yes they are... :/
     
  7. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Messages:
    1,264
    Positive Ratings:
    748
    If the map allways has the win by a timer you can use a round_win and reset the map manualy. (then the message stays correct at least)

    http://developer.valvesoftware.com/wiki/Game_round_win
    As you can see it has a force_map_reset option. Turn it off and the map doesnt reset.

    With the tcp_master you however cant do that.

    EDIT: another quick workarround that could work

    Have a CP outside the map that is neutral all the time. It has to be used in a round though so give it a round with a low priority. On each roundwin simply reset the map by giving the cps the old owner back again. Then you can use a counter to count the wins as the tcp_master wont reset the map because the neutral point wasnt capped. On the final win give the neutral point the winning team as owner and then the map should reset.

    In short:
    2 rounds, 1 is the round you play, the other one is a round with all cps including the neutral one (it wont be played though).

    It can take some time in getting it work as it should but in theory it works already.
     
    Last edited: Oct 6, 2009
  8. Nutomic

    Nutomic L11: Posh Member

    Messages:
    888
    Positive Ratings:
    177
    Sure? At least they do not in CS:S
     
  9. x6herbius

    aa x6herbius

    Messages:
    377
    Positive Ratings:
    271
    It was cp_warpath_elite from the No Heroes servers. I'm just asking them about it.
     
    Last edited by a moderator: Jun 24, 2010
  10. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    could this be used: env_global ?
     
  11. x6herbius

    aa x6herbius

    Messages:
    377
    Positive Ratings:
    271
    It looked like it would have been perfect, had it been available in TF2. :( I can't see it in the entity list.
     
  12. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Messages:
    1,264
    Positive Ratings:
    748
    They also do in CS:S as far as i know.
     
  13. EArkham

    aa EArkham Necromancer

    Messages:
    1,555
    Positive Ratings:
    2,156
    In ZP:S and HL2, func_brushes will definitely not reset if they move (eg, parented to a func_tracktrain, or teleported). They vanish on a new round. It forced me to change how I did several objectives on zpo_blackbird.

    Disabling or enabling func_brushes seems to reset fine. They just can't move without vanishing on a new round.

    Whether moving func_brushes reset fine in TF2, I can not say.

    Kep