Math_counters resetting

NoodleCollie

Stoat fiend
aa
Jul 30, 2009
383
335
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.
 

NoodleCollie

Stoat fiend
aa
Jul 30, 2009
383
335
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.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
...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.
 

Nutomic

L11: Posh Member
Feb 7, 2009
888
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.
 

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
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:

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
could this be used: env_global ?
With the Orange Box, the entity can also store a numeric variable, the "counter," which can be added to or set directly (but not subtracted from), much like a math_counter which works across multiple maps.
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
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