Ctf - Deciding the winner

00000000000000000000000

L4: Comfortable Member
Jul 9, 2008
175
23
Hopefully this is the last help thread for my map.

I need to know how to choose the winning team when the time runs out on my map. When both teams are on 0 and it runs out it goes to stalemate (And the screen fades to white and everyone dies in an explosion :laugh:).

But, what if Blu were on 1 and Red were on 0, how do I make Blu win?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
I'm guessing you have a timer of some sort governing your round length? Normally this would be easy to do but your mention of stuff happening at the end sounds like you aren't doing things normal. Explain the situation a bit more an I'll be able to better explain what you need. :)
 

00000000000000000000000

L4: Comfortable Member
Jul 9, 2008
175
23
I'm using a teamroundtimer, I have a few "OnFinished" Outputs to make the screen shake, the screen to fade to white, and the explosion sound to play, then it triggers the "GameRoundWin" And then the stalemate message comes up.
 

GrimGriz

L10: Glamorous Member
Jan 2, 2009
774
133
Make a separate gameround win (for red and blu) and a logic compare for the scores so you know which one to trigger?
 

GrimGriz

L10: Glamorous Member
Jan 2, 2009
774
133
If you're using real scores it might not matter...that's just how i did it with a math_counter scoring system...
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
Make two math_counters, one for each team, to keep track of their score, and a logic_compare.

On the counters set initial/min/max to 0. Have each team's capturezone use OnCapture to send an Add input to their counter with a value of 1.

On red's math_counter do this:
OUTPUT|TARGET|INPUT|PARAMETER
OutValue|(the logic_compare)|SetValueCompare|(blank)

On blu's math_counter do this:
OUTPUT|TARGET|INPUT|PARAMETER|DELAY
OutValue|(the logic_compare)|SetCompareValue|(blank)|0.00
OutValue|(the logic_compare)|Compare|(blank)| 0.01

Then on the logic_compare. Set the initial value to 0 (this will be red's score), and the compare value to 0 (this will be blu's score). Set up the following outputs on it:
OUTPUT|TARGET|INPUT|PARAMETER
OnEqual|(the game_round_win)|SetTeam|0
OnGreaterThan|(the game_round_win)|SetTeam|2
OnLessThan|(the game_round_win)|SetTeam|3

This will adjust who the game_round_win makes win.

(three ninjaposts under me! guess that took longer to post than I thought)
 
Last edited:

00000000000000000000000

L4: Comfortable Member
Jul 9, 2008
175
23
Make two math_counters, one for each team, to keep track of their score, and a logic_compare.

On the counters set initial/min/max to 0. Have each team's capturezone use OnCapture to send an Add input to their counter with a value of 1.

On red's math_counter do this:
OUTPUT|TARGET|INPUT|PARAMETER
OutValue|(the logic_compare)|SetValueCompare|(blank)

On blu's math_counter do this:
OUTPUT|TARGET|INPUT|PARAMETER|DELAY
OutValue|(the logic_compare)|SetCompareValue|(blank)|0.00
OutValue|(the logic_compare)|Compare|(blank)| 0.01

Then on the logic_compare. Set the initial value to 0 (this will be red's score), and the compare value to 0 (this will be blu's score). Set up the following outputs on it:
OUTPUT|TARGET|INPUT|PARAMETER
OnEqual|(the game_round_win)|SetTeam|0
OnGreaterThan|(the game_round_win)|SetTeam|2
OnLessThan|(the game_round_win)|SetTeam|3

This will adjust who the game_round_win makes win.

(three ninjaposts under me! guess that took longer to post than I thought)

Thankyou :thumbup: I will marry you one day.
 

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
That example you showed also needs that compare thing on the red one btw. otherwise if red caps once and blue doesnt cap its still a stalemate.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
Actually it doesn't. There are four inputs:
SetValue (sets input and does not perform compare)
SetValueCompare (sets input and performs compare)
SetCompareValue (sets value to compare against and does not perform compare)
Compare (performs compare)
 

00000000000000000000000

L4: Comfortable Member
Jul 9, 2008
175
23
1 more thing though, I made the team_round_timer have an output saying OnFinished to shake the world, fade the screen to white, and enable the trigger hurt. How do I make it only do this when it's a stalemate?