Let’s start with the main entities you’ll need.
First, all the basics:
- tf_gamerules (call this
gamerules)
- logic_auto
- team_control_point_master
- team_round_timer
- game_round_win (3 of these needed, as explained in previous post, call the red one
red_win, the blu one
blu_win and the stalemate one
stalemate)
- filter_activator_tfteam (you’ll need one for each team)
Next we need the entities that will keep track of how many points the teams have, and will output to the required game_round_win when the timer runs out.
- math_counter (call this
counter)
- logic_compare (call this
compare and set Initial Value and Compare Value both to 0)
And for each point, you’ll need:
- team_control_point (call this
cap_X)
- trigger_capture_area
- prop_dynamic (cap_point_base model, call it
cap_X_base)
- logic_auto (you’ll need two of these, explanation will come later. Call one
cap_X_relay_red and the other
cap_X_relay_blu)
Note: replace
X with the number of the point, and make sure each team_control_point has a different index!
Set up all the properties of the basic entities and the control point entities as you would normally, but make sure that in the team_control_point_master you restrict both teams from winning.
You’ll also want to have the logic_auto to input into the tf_gamerules all of the usual things (note that you can change the goal string for each team to describe what they need to do in order to win).
In the outputs of the team_round_timer, add:
|
My Output
|
Target Entity
|
Target Input
|
Parameter
|
Delay
|
Only Once
|OnFinished |
counter
|GetValue |<none> |0.00 |No
Then in the math_counter add:
|
My Output
|
Target Entity
|
Target Input
|
Parameter
|
Delay
|
Only Once
|OnGetValue |
compare
|SetValueCompare |<none> |0.00 |No
And in the logic_compare add:
|
My Output
|
Target Entity
|
Target Input
|
Parameter
|
Delay
|
Only Once
|OnGreaterThan |
blu_win
|RoundWin |<none> |0.00 |No
|OnLessThan |
red_win
|RoundWin |<none> |0.00 |No
|OnEqualTo |
stalemate
|RoundWin |<none> |0.00 |No
This should take care of the end of round conditions, now just to make sure the the math_counter gets the right value at the end of the round.
In the output tab of each team_control_point add:
|
My Output
|
Target Entity
|
Target Input
|
Parameter
|
Delay
|
Only Once
|OnCapTeam1 |
counter
|Subtract |1 |0.00 |No
|OnCapTeam2 |
counter
|Add |1 |0.00 |No
|OnCapTeam1 |
cap_X_relay_red
|Trigger |<none> |0.00 |No
|OnCapTeam2 |
cap_X_relay_blu
|Trigger |<none> |0.00 |No
|OnCapTeam1 |
cap_X_relay*
|Enable |<none> |1.00 |Yes
|OnCapTeam2 |
cap_X_relay*
|Enable |<none> |1.00 |Yes
Take note of the wildcards (
* ) ad the delay in the last two outputs. Having them as only once won’t make a difference in terms of logic. Also replace the
X with the point number.
In the outputs of each of the
cap_X_relay_red entities add:
|
My Output
|
Target Entity
|
Target Input
|
Parameter
|
Delay
|
Only Once
|OnTrigger |
counter
|Subtract |1 |0.00 |No
And finally in the outputs of each of the
cap_X_relay_blu entities add:
|
My Output
|
Target Entity
|
Target Input
|
Parameter
|
Delay
|
Only Once
|OnTrigger |
counter
|Add |1 |0.00 |No
The additional adds and subtracts from the relays will only happen once the point has been capped for the first time, as after the point changes teams, not only has the capping team gained a point from capping it, the other team has lost a point from losing it.
Let me know if there’s anything that isn’t working from these entities, and good luck in setting it all up.