I'm working on a test version of a CP map layout I'd like to implement. The basic idea is this:
- 7 control points (two default to each team, 3 neutral)
- 10 minute round timer: round ends after timer expires
- The team with the most CP's controlled after 10 minutes wins. (or takes all 7 CPs for immediate win)
Since this is far, far more complicated than the easy peasy CTF setup I used for truss (rofl), I have some questions that I wasn't able to answer on my own.
I'm thinking about using two math_counter entities for each team, starting them at 2 and incrementing/decrementing them when a team takes/loses a point. Adding a point when a team takes a point is easy, I can add 1 when OnCapTeam1/2 fires. But how do I know if that point was originally a neutral point (in which case red does not lose a point) or if red previously owned the point (in which case red loses a point).
There's an OnBreakTeam1/2 output, but I believe that's when blue walks off the CP and stops capping halfway...but I haven't tested it.
My second question relates to team scoring: I want the team's score when the round ends to reflect the number of CPs owned. For example, if after 10 minutes blue has 5 CPs and red 2 CPs, the score at the end of the round would update to be blue 5, red 2 (or perhaps even blue 6, getting an extra point for a round win). How do I manually update a team's score?
- 7 control points (two default to each team, 3 neutral)
- 10 minute round timer: round ends after timer expires
- The team with the most CP's controlled after 10 minutes wins. (or takes all 7 CPs for immediate win)
Since this is far, far more complicated than the easy peasy CTF setup I used for truss (rofl), I have some questions that I wasn't able to answer on my own.
I'm thinking about using two math_counter entities for each team, starting them at 2 and incrementing/decrementing them when a team takes/loses a point. Adding a point when a team takes a point is easy, I can add 1 when OnCapTeam1/2 fires. But how do I know if that point was originally a neutral point (in which case red does not lose a point) or if red previously owned the point (in which case red loses a point).
There's an OnBreakTeam1/2 output, but I believe that's when blue walks off the CP and stops capping halfway...but I haven't tested it.
My second question relates to team scoring: I want the team's score when the round ends to reflect the number of CPs owned. For example, if after 10 minutes blue has 5 CPs and red 2 CPs, the score at the end of the round would update to be blue 5, red 2 (or perhaps even blue 6, getting an extra point for a round win). How do I manually update a team's score?