Difference between revisions of "TF2/Creating a Payload Map"

From Valve Developer Community
< TF2
Jump to: navigation, search
m (Round Timer)
 
(75 intermediate revisions by 26 users not shown)
Line 1: Line 1:
This tutorial covers the creation of a Payload map, such as Goldrush and Badwater Basin.
+
{{otherlang2
 +
|ru=TF2/Creating_a_Payload_Map:ru
 +
|ko=TF2/Creating a Payload Map:ko
 +
}}
 +
{{Template:ABSGametypeLib}}
  
This tutorial presumes that you are able to at least create round spawns and the basic layout of the map, presuming that the blue team attacks and the red team defends you will need to have a basic layout for the payload to travel along and know where the capture points will need to go. In this tutorial you will create the train for the payload and all the necessary entities to work the map with 2 capture points on the first round.
+
This tutorial will walk you through setting up the basic elements of a payload map. The standard convention is that the blue team attacks and the red team defends. This tutorial offers no advice as to how the layout of a payload map should be designed. For that information, see [[Payload Design Theory]]. In this tutorial you will create the train for the payload and all the necessary entities to work the map with 2 capture points on the first round. To create a single stage payload map, certain entities are unnecessary and you will be alerted to what can be omitted.
  
 
== Setting up the round ==
 
== Setting up the round ==
 +
=== Game Rules and Logic ===
 
For this tutorial there is only 1 round but has been made with other rounds in mind.
 
For this tutorial there is only 1 round but has been made with other rounds in mind.
 +
 
*Create a {{ent|tf_gamerules}} and name it '''GameRules'''.
 
*Create a {{ent|tf_gamerules}} and name it '''GameRules'''.
  
 
*Create a {{ent|logic_auto}} entity and select the outputs tab.
 
*Create a {{ent|logic_auto}} entity and select the outputs tab.
::{|
+
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
|-
 
|-
Line 18: Line 24:
 
|-
 
|-
 
| [[Image:Io11.png]] || OnMultiNewMap || GameRules || SetBlueTeamRespawnWaveTime || 8 || 0.00 || No
 
| [[Image:Io11.png]] || OnMultiNewMap || GameRules || SetBlueTeamRespawnWaveTime || 8 || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnMapSpawn || GameRules || SetBlueTeamGoalString || #Goldrush_blue_final_goal || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnMapSpawn || GameRules || SetRedTeamGoalString || #Goldrush_red_final_goal || 0.00 || No
 
|}
 
|}
  
 
*Place a {{ent|team_control_point_master}} and name it '''CP_master''', and adjust the properties (not all are displayed).
 
*Place a {{ent|team_control_point_master}} and name it '''CP_master''', and adjust the properties (not all are displayed).
::{|
+
::{| class=standard-table
 
!  Property Name || Description || Value
 
!  Property Name || Description || Value
 
|-
 
|-
Line 38: Line 48:
 
| Play all rounds before changelevel || Self-explanatory || Only changelevel after all mini-rounds have been played to completion
 
| Play all rounds before changelevel || Self-explanatory || Only changelevel after all mini-rounds have been played to completion
 
|-
 
|-
| Rate at which to give partial cap points for area captures || Self-explanatory || 0.1
+
| Partial cap rate || Rate at which to give partial cap points for area captures || 0.1
 
|}
 
|}
  
*Create a {{ent|team_control_point_round}} and name it '''Round_A''', presuming that this is the only 1 round and there are only 2 capture points.
+
{{note|Use Changelevel normally for the property "Play all round before changelevel" if you are designing a single-stage payload level.}}
::{|
+
 
 +
=== Round Entities ===
 +
 
 +
Next, an entity must be set up for each round in a round-based payload map.
 +
 
 +
{{note|This entity is unnecessary for a single-stage payload level.}}
 +
 
 +
*Create a {{ent|team_control_point_round}} entity, and name it Round_A.
 +
 
 +
Set the {{ent|team_control_point_round}} properties as follows:
 +
 
 +
::{| class=standard-table
 
!  Property Name || Description || Value
 
!  Property Name || Description || Value
 
|-
 
|-
Line 51: Line 72:
 
| Print Name || Self-explanatory ||  
 
| Print Name || Self-explanatory ||  
 
|-
 
|-
| Priority || Higher rounds are played first || 0
+
| Priority || Higher rounds are played first || #TotalRounds
 
|-
 
|-
 
| Control points in this round || Self-explanatory || CP_A_1 CP_A_2
 
| Control points in this round || Self-explanatory || CP_A_1 CP_A_2
Line 57: Line 78:
 
| Restrict team from winning || Self-explanatory || Red
 
| Restrict team from winning || Self-explanatory || Red
 
|}
 
|}
If you had 2 round then the priority of '''Round_A''' would be 1 and '''Round_B''' would be 0.
 
  
This tutorial presumes that you all ready know how to use a {{ent|team_round_timer}} entity and will not be explained here.
+
{{note|The priority property is counter-intuitive. The higher the number, the higher the priority. So for round 1 of a 3 round level, the priority should be set to 3.}}
  
== Building the payload ==
+
{{note|Subsequent team_control_point_round entities should be lower in priority, and have the correct corresponding capture points indicated.}}
[[image:Tutpayload train1.JPG|thumb|right|200px|Basic payload train.]]
+
 
This section will help you build the train section and the entities needed to get it to function.
+
=== Round Timer ===
*Create a brush the same size of the payload model, but using the <code>tools/toolsclip</code> texture and make it a {{ent|func_tracktrain}}. The train needs to be pointing right on the top view for the engine to automatically orientate the train correctly in game. Name this brush '''Bomb_Train'''. Set the origin of the {{ent|func_tracktrain}} to be above the train. This will ensure that the spectator camera view of the cart is above the cart, and not in the cart.
+
 
*Create a {{ent|prop_dynamic}} and set the model to <code>models/props_trainyard/bomb_cart.mdl</code>, name this '''Bomb_Model''' and set the parent to '''Bomb_Train'''. Resize the '''Bomb_Train''' brush so that it matches the size of the model. This ensures that the players won't get stuck in the model.
+
Now we will create entities that will ensure that if the round time runs out, that Red team will win.
*Using the <code>tools/toolstrigger</code> texture create a box around the train to be used as the capture zone. Make this a {{ent|trigger_capture_area}} and name it '''Bomb_CapArea''' and set the parent to '''Bomb_Train'''. This is the brush which will actually be used to trigger the payload to move, so needs to extend out from the model as far as you wish players to be when moving the payload.
+
 
*Create another box using the <code>tools/toolstrigger</code> again around the train, the same size as the '''Bomb_CapArea''' brush, which will be the regen and health zone. Make this into a {{ent|dispenser_touch_trigger}} naming it '''Bomb_Dispense''' and setting the parent again to '''Bomb_Train'''.
+
*Create a {{ent|game_round_win}} entity and name it '''Round_Win''' Set Team to '''Red'''.
*Create a {{ent|mapobj_cart_dispenser}} entity and place it where you want the healing beam to come from, Name this '''Bomb_DispenseBeam''' and set the parent to '''Bomb_Train''' (set the team to '''Blue''' and the custom touch trigger to '''Bomb_Dispense''' and that is all that is needed for the healing zone)
 
*Place a {{ent|math_remap}} entity above the train and name it '''Bomb_Remap'''.
 
*Finally place a {{ent|logic_case}} entity above the train and name it '''Bomb_LogicCase'''.
 
  
== Activating the payload ==
+
*Create a {{ent|team_round_timer}} entity and set the following properties:
You should now have what looks like a bomb surrounded by 3 cubes and a few entities, in this section you will need to set the values, the inputs and the outputs required to get the train working.
 
  
=== Cap Zone ===
+
::{| class=standard-table
First set up the capture zone.
 
*Click on and find the properties of the '''Bomb_CapArea''', we will be using '''CP_A_1''' as the first capture point
 
::{|
 
 
!  Property Name || Description || Value
 
!  Property Name || Description || Value
 
|-
 
|-
| Name || Name of the entity || Bomb_CapArea
+
| Name || Name of the entity || Round_Timer
 +
|-
 +
| Timer length (in seconds) || Self-explanatory || 270
 +
|-
 +
| Max timer length (in seconds) || Self-explanatory || 600
 +
|-
 +
| Start paused || Self-explanatory || No
 
|-
 
|-
| Start Disabled || Self-explanatory || No
+
| Setup timer length (in seconds) || Self-explanatory || 70
 
|-
 
|-
| Parent || Self-explanatory || Bomb_Train
+
| Reset time on round restart || Self-explanatory || Yes
 +
|}
 +
 
 +
Go to outputs and enter the following new outputs:
 +
 
 +
::{| class=standard-table
 +
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
|-
 
|-
| Control Point || The cap assigned to this trigger || CP_A_1
+
| [[Image:Io11.png]] || OnFinished || Round_Win|| RoundWin ||  || 0.00 || No
 
|-
 
|-
| Can RED cap? || Self-explanatory || No
+
| [[Image:Io11.png]] || OnSetupFinished || SetupGate || Open ||  || 0.00 || No
 +
|}
 +
 
 +
This sets the winner of the round to Red when time runs out, and opens the SetupGate after the setup timer expires.
 +
 
 +
{{note|Creating a SetupGate is not discussed in this tutorial at this time.}}
 +
 
 +
=== Filters ===
 +
Now we will create important filters for this gametype.
 +
 
 +
*Create a {{ent|filter_activator_name}} entity with the following properties:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 
|-
 
|-
| Can BLUE cap? || Self-explanatory || Yes
+
| Name || Name of the entity || Filter_Cart
 
|-
 
|-
| Number of RED players to cap || Self-explanatory || 1
+
| Filter mode || Self-explanatory || Allow entities that match criteria
 
|-
 
|-
| Number of BLUE players to cap || Self-explanatory || 1
+
| Filter Name || Self-explanatory || Bomb_Model
 +
|}
 +
 +
This entity is used so only the cart prop will activate the final capture and explosion.
 +
 
 +
*Create a {{ent|filter_activator_class}} entity with the following properties:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 
|-
 
|-
| RED spawn adjust || How much to change the spawn time on cap || 0
+
| Name || Name of the entity || Filter_Players
 
|-
 
|-
| Blue spawn adjust || How much to change the spawn time on cap || 0
+
| Filter mode || Self-explanatory || Disallow entities that match criteria
 
|-
 
|-
| Time to cap || Self-explanatory || 99999
+
| Filter Classname || Self-explanatory || player
|}
+
|}
 +
 +
This entity is used to prevent players from being hurt by the cart.
 +
 
 +
{{note|The following entities are only required for multi-round payload levels.}}
 +
 
 +
*Create a {{ent|filter_activator_tfteam}} entity with the following properties:
  
*Now select the outputs tab and create 2 new outputs, '''Watcher_A''' will be created later and is used to display the trains progress on the HUD.
+
::{| class=standard-table
::{|
+
! Property Name || Description || Value
!   || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
+
|-
 +
| Name || Name of the entity || filter_A_2
 
|-
 
|-
| [[Image:Io11.png]] || OnNumCappersChanged || Bomb_Remap || InValue || <none> || 0.00 || No
+
| Filter mode || Self-explanatory || Allow entities that match criteria
 
|-
 
|-
| [[Image:Io11.png]] || OnNumCappersChanged || Watcher_A || SetNumTrainCappers || <none> || 0.00 || No
+
| Associated Control Point || Self-explanatory || CP_A_2
|}
+
|}
 +
 +
This filter is used for any entity that should be usable by the owner of the Second Capture Point of the First Round. This could apply to Spawn Door Triggers, Resupply/Regeneration Triggers, etc.
 +
 
 +
*Create another {{ent|filter_activator_tfteam}} entity with the following properties:
  
=== Remap ===
+
::{| class=standard-table
Now we can set up the '''Bomb_Remap''' entity, this is used to limit the number of player caps from 0 to 3 and the train will only have 3 speed (It is possible to create a greater number of train speeds).
 
*Click on the '''Bomb_Remap''' entity and find the properties.
 
::{|
 
 
!  Property Name || Description || Value
 
!  Property Name || Description || Value
 
|-
 
|-
| Name || Name of the entity || Bomb_Remap
+
| Name || Name of the entity || filter_B_2
 
|-
 
|-
| Start Disabled || Self-explanatory || No
+
| Filter mode || Self-explanatory || Allow entities that match criteria
 +
|-
 +
| Associated Control Point || Self-explanatory || CP_B_2
 +
|}
 +
 
 +
Similar to the entity above, this filter should be used for any entity that should be usable by the owner of the Second Capture Point of the Second Stage.
 +
 
 +
== Building the payload ==
 +
=== Prepping the payload ===
 +
[[image:Tutpayload train1.JPG|thumb|right|200px|Basic payload train.]]
 +
This section will help you build the train section and the entities needed to get it to function.
 +
 
 +
First we create a simple brush entity that represents the payload train.
 +
 
 +
*Create a brush the same size of the payload model(64 79 128), but using the <code>tools/toolsclip</code> texture and make it a {{ent|func_tracktrain}} (with ctrl+t). Name this brush '''Bomb_Train'''.
 +
 
 +
:{{note|Make sure your train is oriented 0 degrees: facing east/right from the overhead view in Hammer. It must stay oriented this way to function properly.}}
 +
 
 +
*Set the origin of the {{ent|func_tracktrain}} to be above the train. This will ensure that the spectator camera view of the cart is above the cart, and not in the cart.
 +
 
 +
:{{note|In order to set the origin above the train, edit the z value of the origin property in the func_tracktrain. Raising the origin by a value of +16 units should be sufficient in most cases.}}
 +
 
 +
Now we add the actual physics prop for the train.
 +
 
 +
*Create a {{ent|prop_physics_override}} and set the following properties:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 
|-
 
|-
| Minimum Valid Input Value || Self-explanatory || 0
+
| Name || Name of the entity || Bomb_Model
 
|-
 
|-
| Maximum Valid Input Value || Self-explanatory || 3
+
| Pitch Yaw Roll || Y Z X || 0 180 0
 
|-
 
|-
| Output Value When Input Is Min || Self-explanatory || 0
+
| World Model || Self-explanatory || <code>models/props_trainyard/bomb_cart.mdl</code>
 
|-
 
|-
| Output Value When Input Is Max || Self-explanatory || 3
+
| Disable Shadows || Self-explanatory || Yes
 +
|-
 +
| Fade Scale || Forcible fade distance || 0
 
|}
 
|}
  
*Now select the outputs tab and create a new output, this will send the amended value to the '''Bomb_LogicCase'''.
+
:{{note|Resize the '''Bomb_Train''' brush so that it matches the size of the model. This ensures that the players won't get stuck in the model.}}
::{|
+
 
!   || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
+
Now we need to attach the cart's model to the '''Bomb_Train.'''
 +
 
 +
*Create a '''phys_constraint''' with the parameters:
 +
 
 +
::{| class=standard-table
 +
! Property Name || Value
 +
|-
 +
| Name || Bomb_Const
 +
|-
 +
| Entity 1 || Bomb_Train
 
|-
 
|-
| [[Image:Io11.png]] || OutValue || Bomb_LogicCase || InValue || <none> || 0.00 || No
+
| Entity 2 || Bomb_Model
 
|}
 
|}
  
=== Logic Case ===
+
Now we need to add a volume to keep objects from getting stuck on the cart.
We are now able to setup the '''Bomb_LogicCase''' to set the speed of the train on its path.
+
 
*Again click on and find the properties of the '''Bomb_LogicCase'''.
+
*Create a brush slightly larger than the payload model, but this time use the <code>tools/tooltrigger</code> texture and make it a {{ent|trigger_hurt}} brush. Set the following properties for this trigger:
::{|
+
 
 +
::{| class=standard-table
 
!  Property Name || Description || Value
 
!  Property Name || Description || Value
 
|-
 
|-
| Name || Name of the entity || Bomb_LogicCase
+
| Parent || Entity bound to || Bomb_Train
 
|-
 
|-
| Case 01 || Self-explanatory || 0
+
| Filter Name || Applicable Filter || Filter_Players
 
|-
 
|-
| Case 02 || Self-explanatory || 1
+
| Damage || Self-explanatory || 1000
 +
|}
 +
 
 +
::Edit the flags: Uncheck '''Clients''', Check '''Everything (not including physics debris)'''
 +
 
 +
Now we need to create the capture or push zone around the payload cart.
 +
 
 +
*Using the <code>tools/toolstrigger</code> texture create a box around the train to be used as the capture zone. Make this a {{ent|trigger_capture_area}} and set the following properties:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 
|-
 
|-
| Case 03 || Self-explanatory || 2
+
| Name || Name of the entity || Bomb_CapArea
 
|-
 
|-
| Case 04 || Self-explanatory || 3
+
| Parent || Entity bound to || Bomb_Train
 
|}
 
|}
The rest can be ignored.
 
  
*Now select the outputs tab and create a new output, this will send the amended value to the '''Bomb_LogicCase'''.
+
:{{note|This brush needs to extend out from the model as far as you wish players to be when moving the payload.}}
::{|
+
 
!   || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
+
Now it's time to set up the regeneration zone around the cart.
 +
 
 +
*Create another box using the <code>tools/toolstrigger</code> texture again around the train. Make this brush the same size as the '''Bomb_CapArea'''. This new trigger  will be the health and ammo regeneration zone. Make this into a {{ent|dispenser_touch_trigger}} with the following properties:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Name of the entity || Bomb_Dispense
 +
|-
 +
| Parent || Entity bound to || Bomb_Train
 +
|}
 +
 
 +
=== Activating the payload ===
 +
In this section you will need to set the values, the inputs and the outputs required to get the train working. First we will set some additional properties in the '''Bomb_CapArea'''. Make sure the following properties are set:
 +
 
 +
::{| class=standard-table
 +
! Property Name || Description || Value
 +
|-
 +
| Name || Name of the entity || Bomb_CapArea
 +
|-
 +
| Start Disabled || Self-explanatory || No
 +
|-
 +
| Parent || Self-explanatory || Bomb_Train
 +
|-
 +
| Control Point || The cap assigned to this trigger || CP_A_1
 +
|-
 +
| Can RED cap? || Self-explanatory || No
 +
|-
 +
| Can BLUE cap? || Self-explanatory || Yes
 +
|-
 +
| Number of RED players to cap || Self-explanatory || 1
 
|-
 
|-
| [[Image:Io11.png]] || OnCase01 || Bomb_Train || SetSpeedDirAccel || 0 || 0.00 || No
+
| Number of BLUE players to cap || Self-explanatory || 1
 
|-
 
|-
| [[Image:Io11.png]] || OnCase02 || Bomb_Train || SetSpeedDirAccel || 0.5 || 0.00 || No
+
| RED spawn adjust || How much to change the spawn time on cap || 0
 
|-
 
|-
| [[Image:Io11.png]] || OnCase03 || Bomb_Train || SetSpeedDirAccel || 0.75 || 0.00 || No
+
| Blue spawn adjust || How much to change the spawn time on cap || 0
 
|-
 
|-
| [[Image:Io11.png]] || OnCase04 || Bomb_Train || SetSpeedDirAccel || 1 || 0.00 || No
+
| Time to cap || Prevents capture by standing in the zone || 99999
 
|}
 
|}
  
=== Train ===
+
Next, we can work on the '''Bomb_Train'''. This tutorial presumes that you want the mine cart sounds from Goldrush. Make sure these variables are set correctly:
We can work on the '''Bomb_Train''', this tutorial presumes that you want the mine cart sounds from Goldrush.
+
 
*Begin changing properties of '''Bomb_Train''', presuming that Track_A_01 is the first point of the track, not all values will be shown here.
+
::{| class=standard-table
::{|
 
 
!  Property Name || Description || Value
 
!  Property Name || Description || Value
 
|-
 
|-
Line 201: Line 332:
 
|}
 
|}
  
You will also have to set the '''Height above track''' property to match the height of the origin of the {{ent|func_tracktrain}} from the bottom of the {{ent|func_tracktrain}}. This will make sure that your train sits on the ground nicely, but also that the spectator camera still works. You will most likely need to modify this value slightly, so that if you have any track props, or rims on the wheels of the cart, that they match up neatly when compiled.
+
*Additionally, click on the '''Flags''' tab and check '''No User Control''' and '''Is unblockable by player'''.
  
The '''Bomb_Train''' doesn't have any outputs but does require a few flags to be enabled.
+
{{note|You might also have to set the '''Height above track''' property to  make sure that your train sits on the ground nicely, but also that the spectator camera still works. You will most likely need to modify this value slightly, about 4 units, so that if you have any track props or rims on the wheels of the cart that they match up neatly when compiled.}}
*Click on the Flags tab and enable '''No User Control''' and '''Is unblockable by player'''.
 
  
 
== Building the Track ==
 
== Building the Track ==
 +
 +
You may want to lay track models first until you know what each model is.
 
[[image:Tutpayload track1.JPG|thumb|right|200px|Trains path.]]
 
[[image:Tutpayload track1.JPG|thumb|right|200px|Trains path.]]
 +
 
You now have a working train but you will now need to build a line for it to run on.
 
You now have a working train but you will now need to build a line for it to run on.
 +
 
*Create a {{ent|path_track}} entity and place it where you want to start the track, Name this '''Track_A_01'''.
 
*Create a {{ent|path_track}} entity and place it where you want to start the track, Name this '''Track_A_01'''.
 +
 
*Create another {{ent|path_track}} and place it where you next want the line to follow and name this '''Track_A_02'''.
 
*Create another {{ent|path_track}} and place it where you next want the line to follow and name this '''Track_A_02'''.
 +
 
*Click back on '''Track_A_01''' and set <code>Next Stop Target</code> to '''Track_A_02'''.
 
*Click back on '''Track_A_01''' and set <code>Next Stop Target</code> to '''Track_A_02'''.
 +
 
*Keep creating new {{ent|path_track}} and continue naming and linking them in the line you want the train to follow.
 
*Keep creating new {{ent|path_track}} and continue naming and linking them in the line you want the train to follow.
  
 
{{note|If you clone a [[path_track]] entity(Shift-drag), Hammer will automaticly link these together so you can quickly build track without naming manually.}}
 
{{note|If you clone a [[path_track]] entity(Shift-drag), Hammer will automaticly link these together so you can quickly build track without naming manually.}}
  
To mimic the track models seen in tf2, use several {{ent|prop_static}} entities to generate the track segments, and place these on the path underneath the {{ent|path_track}} entities. The models required are those named <code>props_mining/track*.mdl</code> with the asterisk in place of the type of track segment required. For the model around the midpoint capture points, use a {{ent|prop_dynamic}} entity, with the world model as <code>props_trainyard/track_midcap.mdl</code>. Name this '''CP_A_1_Model'''.
+
To mimic the track models seen in tf2, use several {{ent|prop_static}} entities to generate the track segments, and place these on the path underneath the {{ent|path_track}} entities.  
 +
 
 +
*The models required are those named <code>props_mining/track*.mdl</code> with the asterisk in place of the type of track segment required.  
 +
 
 +
*For the model around the midpoint capture points, use a {{ent|prop_dynamic}} entity, with the world model as <code>props_trainyard/track_midcap.mdl</code>. Name your first capture point model '''CP_A_1_Model'''.
  
== Adding a Capture Point ==
+
== Adding a Capture Point ==  
There can be 1 to 3 capture points per round making 2 different types, mid point captures and final captures.
+
[[image:Tutpayload cap1.JPG|thumb|right|200px|Middle capture point.]]
  
'''Warning''': If you have not created capture points before then please read [[TF2/Creating_a_Capture_Point|Creating a Capture Point]] to go over the details of setting up a {{ent|team_control_point}} correctly!
+
There are generally two capture points per round: midpoint captures and endpoint captures.
  
 
=== Mid point cap ===
 
=== Mid point cap ===
[[image:Tutpayload cap1.JPG|thumb|right|200px|Middle capture point.]]
+
First, make sure you have your static '''CP_A_1_Model''' in place. Next, find the Path_Track that sits directly on top of that model. In this example it's '''Track_A_24'''.
First create a {{ent|logic_relay}} next to the cap and name it '''CP_A_1_Relay''', this is used to trigger a number of actions and can be used to open mid point gates or close other gates, use this to add time to the round timer and to change the skin of any models you have at the mid point.
+
 
*Select '''CP_A_1_Relay''' and select the outputs tab.
+
*Select the middle {{ent|path_track}} and go to the outputs tab. Add the following outputs:
::{|
+
 
 +
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
|-
 
|-
| [[Image:Io11.png]] || OnTrigger || Bomb_CapArea || CaptureCurrentCP||  || 0.00 || No
+
| [[Image:Io11.png]] || OnPass || CP_A_1_Model || Skin || 1 || 0.00 || Yes
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_CapArea || CaptureCurrentCP ||  || 0.00 || Yes
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Round_Timer || AddTeamTime || 3 240 || 0.00 || Yes
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Track_A_23 || DisablePath ||  || 0.00 || Yes
 +
|-
 +
| [[Image:Io11.png]] || OnPass || cap_sound || PlaySound ||  || 0.00 || Yes
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_Sparks || StopSpark ||  || 0.00 || Yes
 +
|-
 +
| [[Image:Io11.png]] || OnPass || CP_A_1 || SetOwner || 3 || 0.10 || Yes
 +
|}
 +
 
 +
This performs several important functions when the payload cart reaches this track point. It changes the skin on the capture point model, it captures the area for blue team, disables rollback to the previous track point, plays a sound and stops sparking effects, as well as adding time to blue team's assault via the Round_Timer.
 +
 
 +
Now we need to create the {{ent|team_control_point}} entity and position it so that it is floating over the center of the model and track point.
 +
 
 +
*Set the following properties on your newly created {{ent|team_control_point}}:
  
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Name of the entity || CP_A_1
 +
|-
 +
| Start Disabled || Self-explanatory || No
 +
|-
 +
| Print Name || Name to display on HUD || #Goldrush_cap_1_A
 +
|-
 +
| Group Index || N/A || 0
 
|-
 
|-
| [[Image:Io11.png]] || OnTrigger || CP_A_1_Model || Skin|| 1 || 0.00 || No
+
| Default Owner || Team || Red
 +
|-
 +
| Index || #ofCapPoint starting at 0 || 0
 +
|-
 +
| Warning Type || Announcer || No Announcements
 +
|-
 +
| BLUE Previous Required Point || Self-Explanatory || CP_A_1
 
|}
 
|}
  
You will need to find the {{ent|path_track}} in the middle of the cap, in this example it's '''Track_A_24'''.
+
::Set the following output:
*Select the middle {{ent|path_track}} and got to the outputs tab.
+
 
::{|
+
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
|-
 
|-
| [[Image:Io11.png]] || OnPass || CP_A_1_Relay || Trigger || || 0.00 || Yes
+
| [[Image:Io11.png]] || OnCapTeam2 || Bomb_CapArea || SetControlPoint || CP_A_2 || 0.00 || Yes
 +
|}
 +
 
 +
This effectively creates a capture point. This will display a red hologram over the point until blue captures the point, thus displaying a blue hologram. Additionally, the output sets the next capture point for the payload.
 +
 
 +
{{note| The first capture point should have an index value of zero, which each following capture point increasing by +1.}}
 +
{{note| Warning Type should be set to No Announcements because announcement messages will be handled by the {{ent|team_train_watcher}}.}}
 +
 
 +
=== End point cap ===
 +
Set up this point's {{ent|team_control_point}} entity with the same properties as '''CP_A_1''', but with the following changes:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Name of the entity || CP_A_2
 +
|-
 +
| Print Name || Name to display on HUD || #Goldrush_cap_1_B
 +
|-
 +
| Index || #ofCapPoint starting at 0 || 1
 +
|-
 +
| BLUE Previous Required Point || Self-Explanatory || CP_A_1
 +
|}
 +
 
 +
::Don't forget, this entity needs the following output:
 +
 
 +
::{| class=standard-table
 +
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
|-
 
|-
| [[Image:Io11.png]] || OnPass || CP_A_1 || SetOwner || 3 || 0.20 || No
+
| [[Image:Io11.png]] || OnCapTeam2 || Bomb_CapArea || SetControlPoint || CP_B_1 || 0.00 || No
 
|}
 
|}
  
This tutorial presumes that you know how to create a {{ent|team_control_point}}, name this '''CP_A_1''' and set the owner to '''Red'''.
+
This sets up the capture point for the next round.
{{note|Note the 0.20 delay on SetOwner, which prevent from capping both current (CP_A_1) and next point (CP_A_2; see below) at the same time.}}
+
 
*Don't forget on the properties to set '''warning type''' to No Announcements, the announcements are handled by the {{ent|team_train_watcher}}.
+
*Set the following outputs on your second to last {{ent|path_track}}. For this tutorial it is '''Track_A_42'''.
*Open the outputs tab and add the following.
+
 
::{|
+
Set Track_A_42 Outputs:
 +
 
 +
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
|-
 
|-
| [[Image:Io11.png]] || OnCapTeam2 || Track_A_23 || DisablePath ||  || 0.00 || No
+
| [[Image:Io11.png]] || OnPass || Bomb_CapArea || CaptureCurrentCP ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_CapArea || Disable ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_Light || Stop ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_Train || Stop ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || cap_sound || PlaySound ||  || 0.00 || Yes
 
|-
 
|-
| [[Image:Io11.png]] || OnCapTeam2 || Bomb_CapArea || SetControlPoint || CP_A_2 || 0.00 || No
+
| [[Image:Io11.png]] || OnPass || CP_A_2 || SetOwner || 3 || 0.10 || Yes
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_Train || SetSpeedDirAccel || 1 || 1.00 || No
 
|}
 
|}
  
This disables the path behind the train and prevents it rolling back, it also sets up the next capture point.
+
The last {{ent|path_track}} should be underneath this one in order for the cart to ride down the chute like in Goldrush. This final track point, '''Track_A_43''', should have the following Outputs:
{{note|Track_A_23 is the path_track before the center of the Capture Point. Adjust as necessary.}}
 
  
=== End point cap ===
+
::{| class=standard-table
The end point is set up in exactly the same way as a mid point, the only difference is what you want to do with it.  
+
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
*The main difference is you will need to disable the '''Bomb_CapArea''' and anything else appropriate to your map, you can use the {{ent|logic_relay}} and the end point to disable them.
+
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_Train || TeleportToPathTrack || Track_B_1 || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_Train || Stop || Track_B_1 || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_CapArea || Enable ||  || 0.00 || No
 +
|}
  
If you intend to have another round you can use the trigger to keep the train moving along the path, you will then need to stop it when it reaches it next starting point, you will also need to disable the {{ent|team_train_watcher}} presumed to be '''Watcher_A''' in this example and to enable the next {{ent|team_train_watcher}} when needed. If you need to enable anything at the right time give it a delay of 15 seconds on the trigger_relay's outputs.
+
This will teleport the cart to the next round's starting track point, and enable it's push area.
  
 
== Train Watcher ==
 
== Train Watcher ==
The final stage is to add in the train display, which is also used to tell when the train should start rolling back.
+
The next stage is to add in the train display, which is also used to tell when the train should start rolling back.
*Create a {{ent|team_train_watcher}} and name this '''Watcher_A'''.
+
 
*Presuming that there are 2 caps and the {{ent|path_track}} are changed where needed set the properties to.
+
*Create a {{ent|team_train_watcher}} and name this '''Watcher_A'''. If you are creating a multi-round map, create a watcher for each round. Set the properties of the first round team_train_watcher to:
::{|
+
 
 +
::{| class=standard-table
 
!  Property Name || Description || Value
 
!  Property Name || Description || Value
 
|-
 
|-
Line 279: Line 500:
 
|-
 
|-
 
| Train to watch || Self-explanatory || Bomb_Train
 
| Train to watch || Self-explanatory || Bomb_Train
 +
|-
 +
| Allow the train to recede || Self-explanatory || Yes
 +
|-
 +
| Train recede time (in seconds) || Self-explanatory || 0
 +
|-
 +
| Handle Train Movement || Self-explanatory || Yes
 +
|-
 +
| Default Speed Modifier || Self-explanatory || 1
 +
|-
 +
| Associated env_spark || Self-explanatory || Bomb_Sparks
 
|-
 
|-
 
| Node that the path starts at || Self-explanatory || Track_A_01
 
| Node that the path starts at || Self-explanatory || Track_A_01
Line 288: Line 519:
 
| Linked CP 1 || Self-explanatory || CP_A_1
 
| Linked CP 1 || Self-explanatory || CP_A_1
 
|-
 
|-
| Linked PathTrack 2 || Self-explanatory || Track_A_43
+
| Linked PathTrack 2 || Self-explanatory || Track_A_42
 
|-
 
|-
 
| Linked CP 2 || Self-explanatory || CP_A_2
 
| Linked CP 2 || Self-explanatory || CP_A_2
Line 303: Line 534:
 
|}
 
|}
  
*now select the outputs tab.
+
Subsequent watchers should be created for each round with appropriately modified variables, such as the name, linked control points, and linked path tracks and nodes. The rest of the variables can stay the same.
::{|
+
 
 +
== Additional Effects ==
 +
 
 +
On Gold Rush and Badwater, additional effects are added to the cart, such as the dispenser beam, a flashing light, and sparks while the train is moving backwards along the track. Both are simple entities that start and stop depending on certain conditions.
 +
 
 +
=== Dispenser Beam ===
 +
 
 +
Now we will add a dispense beam effect to the train.
 +
 
 +
*Create a {{ent|mapobj_cart_dispenser}} entity and place it where you want the healing beam to come from. Set the following properties:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Name of the entity || Bomb_DispenseBeam
 +
|-
 +
| Parent || Entity bound to || Bomb_Train
 +
|-
 +
| Team || Selt-explanatory || Blue
 +
|-
 +
| Custom Touch Trigger || Trigger zone || Bomb_Dispense
 +
|}
 +
 
 +
=== Flashing Light ===
 +
 
 +
*Create a {{ent|info_particle_system}} and align it with the light on top of the bomb cart, and name it '''Bomb_Light'''
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Name of the entity || Bomb_Light
 +
|-
 +
| Parent || Self-explanatory || Bomb_Train
 +
|-
 +
| Particle System Name || Self-explanatory || cart_flashinglight
 +
|-
 +
| Start Active? || Self-explanatory || No
 +
|}
 +
 
 +
=== Sparks ===
 +
 
 +
*Create a {{ent|env_spark}} entity at the bottom center of both rear wheels and name it '''Bomb_Sparks'''
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Name of the entity || Bomb_Sparks
 +
|-
 +
| Parent
 +
|| Self-explanatory || Bomb_Train
 +
|-
 +
| Spark Trail Length || Self-explanatory || Medium
 +
|}
 +
 
 +
=== Capture Bell ===
 +
 
 +
On Badwater and Gold Rush, a bell "ding" is used to announce point captures by BLU. Making this sound is simple.
 +
 
 +
*Create a new {{ent|ambient_generic}} and name it cap_sound
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Name of the entity || cap_sound
 +
|-
 +
| Sound Name || Self-explanatory || Hud.EndRoundScored
 +
|}
 +
 
 +
==Final Terminus==
 +
[[image:Final pl pit.JPG|thumb|right|300px|Place for explode in Hammer]]
 +
Now we are going to create a basic version of the explosion at the final terminus. KaBOOOOOOM!
 +
 
 +
===Final Capture Point===
 +
 
 +
*Make sure your final team_control_point has its properties properly configured, with Index # reflecting the highest number of total capture points.
 +
*Also, the print name should be increased correctly in sequence,
 +
*Additionally, BLUE Previous Required Point 1 should reflect the previous point's entity name.
 +
*Finally, set the following '''Flags''' as checked:
 +
::{| class=standard-table
 +
!  Flag Name || Description || Value
 +
|-
 +
| Start with model hidden || Self-explanatory || True
 +
|-
 +
| Disable Shadow || Self-explanatory || True
 +
|-
 +
| Disable Sounds || Self-explanatory || True
 +
|}
 +
 
 +
===Explode Pit===
 +
====Pit Model====
 +
 
 +
*First you should create a pit for the cart to fall into for the final explosion. After you've created the brushwork, cover the pit with the following models.
 +
*Create a '''prop_static''' with World Model ''models/hybridphysx/badwater_destruction_before.mdl''
 +
*Make another with World Model ''models/props_farm/sewer_cap001a.mdl''.
 +
 
 +
====Doors to Pit====
 +
 
 +
*Create two brush-entities '''func_door''', with the material ''glass/glasswindow002a'' on the upper face.
 +
Parameters for two '''func_door''':
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Self-explanatory || cap_door
 +
|-
 +
| Speed || Self-explanatory || 700
 +
|-
 +
| Move Direction (Pitch Yaw Roll)|| Self-explanatory || 0 270 0
 +
|}
 +
 
 +
*In '''Flags''' check '''Touch Opens''' to '''false''' and check '''Toggle''' to '''true'''.
 +
 
 +
*On one of two doors create the outputs:
 +
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
|-
 
|-
| [[Image:Io11.png]] || OnTrainStartRecede || Bomb_Train || SetSpeedDirAccel || -0.2 || 0.00 || No
+
| [[Image:Io11.png]] || OnFullyOpen || cap_door || kill || || 0.00 || No
 
|}
 
|}
This will cause the train to start moving backwards at 0.2 of the maximum speed.
+
It will destroy the door when it's fully open.
 +
 
 +
*In the pit create a brush-entity '''trigger_hurt''' with the parameters Damage - 1000, Damage Cap - 1000.
 +
 
 +
*Create a brush-entity '''func_nobuild''' on the upper doors with parameter Team - Any.
 +
 
 +
====Barrels in Pit====
 +
 
 +
*Create 10-15 entities '''prop_dynamic_override''' with WorldModel ''models/props_badlands/barrel03.mdl'' and Name - ''End_Barrels''
 +
 
 +
===Final Explosion===
 +
[[image:Final pl explode.jpg|thumb|right|300px|Final explode (ingame) ([http://www.fpsbanana.com/maps/78017 dpl_mine_b2])]]
 +
 
 +
*Create near pit three {{ent|ambient_generic}}.
 +
 
 +
Parameters of the first:
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Self-explanatory || Cart_tip
 +
|-
 +
| SoundName || Self-explanatory || Cart.Falling
 +
|}
 +
 
 +
Parameters of the second:
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Self-explanatory || pre_kaboom
 +
|-
 +
| SoundName || Self-explanatory || Cart.Trigger
 +
|}
 +
 
 +
Parameters of the Third:
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Self-explanatory || kaboom
 +
|-
 +
| SoundName || Self-explanatory || Cart.Explode
 +
|}
 +
 
 +
Additionally, create an {{ent|env_shake}} entity with the following properties:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Self-explanatory || kaboom_shake
 +
|-
 +
| Amplitude || Self-explanatory || 16
 +
|-
 +
| Effect Radius || Self-explanatory || 500
 +
|-
 +
| Duration || In seconds || 1
 +
|-
 +
| Frequency || Self-explanatory || 150
 +
|}
 +
 
 +
::Set the following '''Flags''' as checked:
 +
::{| class=standard-table
 +
!  Flag Name || Value
 +
|-
 +
| Global Shake || True
 +
|-
 +
| In Air || True
 +
|}
 +
 
 +
*Now create under doors one {{ent|info_particle_system}} with parameters:
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Self-explanatory || pit_effect
 +
|-
 +
| Particle System Name || Self-explanatory || cinefx_goldrush
 +
|-
 +
| Pitch Yaw Roll (Y Z X) || Self-explanatory || -90 0 0
 +
|}
 +
 
 +
*Now create {{ent|trigger_multiple}} with properties:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Self-explanatory || KaBoomZone
 +
|-
 +
| Start Disabled || Self-explanatory || Yes
 +
|}
 +
 
 +
::Set the following outputs:
 +
::{| class=standard-table
 +
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 +
|-
 +
| [[Image:Io11.png]] || OnStartTouch || !activator || SetHealth || -1000 || 0.00 || No
 +
|}
 +
 
 +
Now we are ready to address the outputs for the final {{ent|path_track}}.
 +
 
 +
*Set the outputs as follows:
 +
 
 +
::{| class=standard-table
 +
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 +
|-
 +
| [[Image:Io11.png]] || OnPass || cap_door || Open ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Cart.tip || PlaySound || || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_Light || Stop || || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || CP_C_2 || SetOwner || 3 || 0.10 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_Train || kill||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_Const || Break ||  || 0.01 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || pre_kaboom || PlaySound ||  || 0.50 || No
 +
|-
 +
| [[Image:Io11.png]] || OnPass || Bomb_CapArea || CaptureCurrentCP ||  || 2.00 || No
 +
|}
 +
 
 +
{{note|This tutorial is assuming the final terminus takes place on the second point of the third round, and hence CP_C_2 is SetOwner to 3. Replace the capture point name as necessary.}}
 +
 
 +
Finally, create a {{ent|trigger_once}} brush at the bottom of the pit where you want the cart to explode.
 +
 
 +
*Set the following properties:
 +
 
 +
::{| class=standard-table
 +
!  Property Name || Description || Value
 +
|-
 +
| Name || Self-explanatory ||Final_Trigger
 +
|-
 +
| Start Disabled || Self-explanatory || No
 +
|-
 +
| Filter Name || Associated Filter || Filter_Cart
 +
|}
 +
 
 +
::Add the following outputs:
 +
 
 +
::{| class=standard-table
 +
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 +
|-
 +
| [[Image:Io11.png]] || OnTrigger || kaboom || PlaySound ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnTrigger || kaboom_shake || StartShake ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnTrigger || pit_effect || Start ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnTrigger || end_barrels || kill ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnTrigger || Bomb_CapArea || kill||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnTrigger || Bomb_Model || kill ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnTrigger || KaBoomZone || Enable ||  || 0.00 || No
 +
|-
 +
| [[Image:Io11.png]] || OnTrigger || KaBoomZone || Disable ||  || 0.10 || No
 +
|}
 +
 
 +
::Set the '''Flags''' to only '''Physics debris''' true, with every other flag false.
 +
 
 +
====Timeline====
 +
 
 +
So what happens is:
 +
 
 +
0.0:
 +
*open doors to pit
 +
*destroy '''Bomb_Train'''
 +
*cart tipping sound played
 +
*cart effects disabled
 +
0.01:
 +
*detach and fall cart's model
 +
0.5:
 +
*"beep" sound played
 +
On Contact with Trigger:
 +
*play ka-boom sound
 +
*play ka-boom effect
 +
*ka-boom shakes screen
 +
*destroy barrels
 +
*destroy cart's model
 +
*capture final CP
 +
*destroy Capture Zone
 +
*activate killing zone
 +
After Contact (.1 seconds):
 +
*deactivate killing zone
  
== Conclusion ==
+
You should now have at least a fully working 1 stage round of payload style game play, if you have taken in this tutorial fully you should be able to change the number of rounds and capture point to anything you need.
  
You should now have at least a fully working 1 stage round of payload style game play, if you have taken in this tutorial fully you should be able to change the number of rounds and capture point to anything you need. If you have any questions or complaints, post them on the [[Talk:{{PAGENAME}}|talk page]].
+
== See also ==
 +
* [[TF2/Creating Rollback/Rollforward zones for payload maps|Creating rollback/rollforward zones for payload maps]]
 +
* [[Team Fortress 2 Level Creation]]
  
 
[[Category:Level Design Tutorials]]
 
[[Category:Level Design Tutorials]]
[[Category:Team Fortress 2]]
+
[[Category:Team Fortress 2|Creating]]

Latest revision as of 20:55, 11 January 2019

Русский 한국어
한국어

This gametype is included in A Boojum Snark's Team Fortress 2 Gametype Library

The complete entity setup for this gametype is included in A Boojum Snark's Team Fortress 2 Gametype Library, a downloadable VMF that includes all official Team Fortress 2 gametypes. The entities can easily be transferred from the VMF to your own custom map without the hassle of having to build it yourself or debugging it.

A Boojum Snark's Team Fortress 2 Gametype Library can be downloaded here: TF2Maps.net

This tutorial will walk you through setting up the basic elements of a payload map. The standard convention is that the blue team attacks and the red team defends. This tutorial offers no advice as to how the layout of a payload map should be designed. For that information, see Payload Design Theory. In this tutorial you will create the train for the payload and all the necessary entities to work the map with 2 capture points on the first round. To create a single stage payload map, certain entities are unnecessary and you will be alerted to what can be omitted.

Setting up the round

Game Rules and Logic

For this tutorial there is only 1 round but has been made with other rounds in mind.

  • Create a logic_auto entity and select the outputs tab.
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnMapSpawn GameRules SetRedTeamRole 1 0.00 No
Io11.png OnMapSpawn GameRules SetBlueTeamRole 2 0.00 No
Io11.png OnMultiNewMap GameRules SetRedTeamRespawnWaveTime 4 0.00 No
Io11.png OnMultiNewMap GameRules SetBlueTeamRespawnWaveTime 8 0.00 No
Io11.png OnMapSpawn GameRules SetBlueTeamGoalString #Goldrush_blue_final_goal 0.00 No
Io11.png OnMapSpawn GameRules SetRedTeamGoalString #Goldrush_red_final_goal 0.00 No
Property Name Description Value
Name Name of the entity CP_Master
Start Disabled Self-explanatory No
Cap Layout Self-explanatory
Restrict team from winning Self-explanatory Red
Switch teams on map win? Self-explanatory Yes
Scoring Style Self-explanatory Add team score for each captured point
Play all rounds before changelevel Self-explanatory Only changelevel after all mini-rounds have been played to completion
Partial cap rate Rate at which to give partial cap points for area captures 0.1
Note:Use Changelevel normally for the property "Play all round before changelevel" if you are designing a single-stage payload level.

Round Entities

Next, an entity must be set up for each round in a round-based payload map.

Note:This entity is unnecessary for a single-stage payload level.

Set the team_control_point_round properties as follows:

Property Name Description Value
Name Name of the entity Round_A
Start Disabled Self-explanatory No
Print Name Self-explanatory
Priority Higher rounds are played first #TotalRounds
Control points in this round Self-explanatory CP_A_1 CP_A_2
Restrict team from winning Self-explanatory Red
Note:The priority property is counter-intuitive. The higher the number, the higher the priority. So for round 1 of a 3 round level, the priority should be set to 3.
Note:Subsequent team_control_point_round entities should be lower in priority, and have the correct corresponding capture points indicated.

Round Timer

Now we will create entities that will ensure that if the round time runs out, that Red team will win.

  • Create a game_round_win entity and name it Round_Win Set Team to Red.
Property Name Description Value
Name Name of the entity Round_Timer
Timer length (in seconds) Self-explanatory 270
Max timer length (in seconds) Self-explanatory 600
Start paused Self-explanatory No
Setup timer length (in seconds) Self-explanatory 70
Reset time on round restart Self-explanatory Yes

Go to outputs and enter the following new outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnFinished Round_Win RoundWin 0.00 No
Io11.png OnSetupFinished SetupGate Open 0.00 No

This sets the winner of the round to Red when time runs out, and opens the SetupGate after the setup timer expires.

Note:Creating a SetupGate is not discussed in this tutorial at this time.

Filters

Now we will create important filters for this gametype.

Property Name Description Value
Name Name of the entity Filter_Cart
Filter mode Self-explanatory Allow entities that match criteria
Filter Name Self-explanatory Bomb_Model

This entity is used so only the cart prop will activate the final capture and explosion.

Property Name Description Value
Name Name of the entity Filter_Players
Filter mode Self-explanatory Disallow entities that match criteria
Filter Classname Self-explanatory player

This entity is used to prevent players from being hurt by the cart.

Note:The following entities are only required for multi-round payload levels.
Property Name Description Value
Name Name of the entity filter_A_2
Filter mode Self-explanatory Allow entities that match criteria
Associated Control Point Self-explanatory CP_A_2

This filter is used for any entity that should be usable by the owner of the Second Capture Point of the First Round. This could apply to Spawn Door Triggers, Resupply/Regeneration Triggers, etc.

Property Name Description Value
Name Name of the entity filter_B_2
Filter mode Self-explanatory Allow entities that match criteria
Associated Control Point Self-explanatory CP_B_2

Similar to the entity above, this filter should be used for any entity that should be usable by the owner of the Second Capture Point of the Second Stage.

Building the payload

Prepping the payload

Basic payload train.

This section will help you build the train section and the entities needed to get it to function.

First we create a simple brush entity that represents the payload train.

  • Create a brush the same size of the payload model(64 79 128), but using the tools/toolsclip texture and make it a func_tracktrain (with ctrl+t). Name this brush Bomb_Train.
Note:Make sure your train is oriented 0 degrees: facing east/right from the overhead view in Hammer. It must stay oriented this way to function properly.
  • Set the origin of the func_tracktrain to be above the train. This will ensure that the spectator camera view of the cart is above the cart, and not in the cart.
Note:In order to set the origin above the train, edit the z value of the origin property in the func_tracktrain. Raising the origin by a value of +16 units should be sufficient in most cases.

Now we add the actual physics prop for the train.

Property Name Description Value
Name Name of the entity Bomb_Model
Pitch Yaw Roll Y Z X 0 180 0
World Model Self-explanatory models/props_trainyard/bomb_cart.mdl
Disable Shadows Self-explanatory Yes
Fade Scale Forcible fade distance 0
Note:Resize the Bomb_Train brush so that it matches the size of the model. This ensures that the players won't get stuck in the model.

Now we need to attach the cart's model to the Bomb_Train.

  • Create a phys_constraint with the parameters:
Property Name Value
Name Bomb_Const
Entity 1 Bomb_Train
Entity 2 Bomb_Model

Now we need to add a volume to keep objects from getting stuck on the cart.

  • Create a brush slightly larger than the payload model, but this time use the tools/tooltrigger texture and make it a trigger_hurt brush. Set the following properties for this trigger:
Property Name Description Value
Parent Entity bound to Bomb_Train
Filter Name Applicable Filter Filter_Players
Damage Self-explanatory 1000
Edit the flags: Uncheck Clients, Check Everything (not including physics debris)

Now we need to create the capture or push zone around the payload cart.

  • Using the tools/toolstrigger texture create a box around the train to be used as the capture zone. Make this a trigger_capture_area and set the following properties:
Property Name Description Value
Name Name of the entity Bomb_CapArea
Parent Entity bound to Bomb_Train
Note:This brush needs to extend out from the model as far as you wish players to be when moving the payload.

Now it's time to set up the regeneration zone around the cart.

  • Create another box using the tools/toolstrigger texture again around the train. Make this brush the same size as the Bomb_CapArea. This new trigger will be the health and ammo regeneration zone. Make this into a dispenser_touch_trigger with the following properties:
Property Name Description Value
Name Name of the entity Bomb_Dispense
Parent Entity bound to Bomb_Train

Activating the payload

In this section you will need to set the values, the inputs and the outputs required to get the train working. First we will set some additional properties in the Bomb_CapArea. Make sure the following properties are set:

Property Name Description Value
Name Name of the entity Bomb_CapArea
Start Disabled Self-explanatory No
Parent Self-explanatory Bomb_Train
Control Point The cap assigned to this trigger CP_A_1
Can RED cap? Self-explanatory No
Can BLUE cap? Self-explanatory Yes
Number of RED players to cap Self-explanatory 1
Number of BLUE players to cap Self-explanatory 1
RED spawn adjust How much to change the spawn time on cap 0
Blue spawn adjust How much to change the spawn time on cap 0
Time to cap Prevents capture by standing in the zone 99999

Next, we can work on the Bomb_Train. This tutorial presumes that you want the mine cart sounds from Goldrush. Make sure these variables are set correctly:

Property Name Description Value
Name Name of the entity Bomb_Train
First Stop Target Self-explanatory Track_A_01
Max Speed Self-explanatory 90
Change Velocity How the acceleration is handled Linear blend
Distance Between the Wheels Self-explanatory 20
Damage on Crush Self-explanatory 99999
Move Sound Self-explanatory Cart.Roll
Start Sound Self-explanatory Cart.RollStart
Stop Sound Self-explanatory Cart.RollStop
Manual Train Speed Self-explanatory On
Manual Accel Speed Self-explanatory 70
Manual Decel Speed Self-explanatory 150
  • Additionally, click on the Flags tab and check No User Control and Is unblockable by player.
Note:You might also have to set the Height above track property to make sure that your train sits on the ground nicely, but also that the spectator camera still works. You will most likely need to modify this value slightly, about 4 units, so that if you have any track props or rims on the wheels of the cart that they match up neatly when compiled.

Building the Track

You may want to lay track models first until you know what each model is.

Trains path.

You now have a working train but you will now need to build a line for it to run on.

  • Create a path_track entity and place it where you want to start the track, Name this Track_A_01.
  • Create another path_track and place it where you next want the line to follow and name this Track_A_02.
  • Click back on Track_A_01 and set Next Stop Target to Track_A_02.
  • Keep creating new path_track and continue naming and linking them in the line you want the train to follow.
Note:If you clone a path_track entity(Shift-drag), Hammer will automaticly link these together so you can quickly build track without naming manually.

To mimic the track models seen in tf2, use several prop_static entities to generate the track segments, and place these on the path underneath the path_track entities.

  • The models required are those named props_mining/track*.mdl with the asterisk in place of the type of track segment required.
  • For the model around the midpoint capture points, use a prop_dynamic entity, with the world model as props_trainyard/track_midcap.mdl. Name your first capture point model CP_A_1_Model.

Adding a Capture Point

Middle capture point.

There are generally two capture points per round: midpoint captures and endpoint captures.

Mid point cap

First, make sure you have your static CP_A_1_Model in place. Next, find the Path_Track that sits directly on top of that model. In this example it's Track_A_24.

  • Select the middle path_track and go to the outputs tab. Add the following outputs:
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPass CP_A_1_Model Skin 1 0.00 Yes
Io11.png OnPass Bomb_CapArea CaptureCurrentCP 0.00 Yes
Io11.png OnPass Round_Timer AddTeamTime 3 240 0.00 Yes
Io11.png OnPass Track_A_23 DisablePath 0.00 Yes
Io11.png OnPass cap_sound PlaySound 0.00 Yes
Io11.png OnPass Bomb_Sparks StopSpark 0.00 Yes
Io11.png OnPass CP_A_1 SetOwner 3 0.10 Yes

This performs several important functions when the payload cart reaches this track point. It changes the skin on the capture point model, it captures the area for blue team, disables rollback to the previous track point, plays a sound and stops sparking effects, as well as adding time to blue team's assault via the Round_Timer.

Now we need to create the team_control_point entity and position it so that it is floating over the center of the model and track point.

Property Name Description Value
Name Name of the entity CP_A_1
Start Disabled Self-explanatory No
Print Name Name to display on HUD #Goldrush_cap_1_A
Group Index N/A 0
Default Owner Team Red
Index #ofCapPoint starting at 0 0
Warning Type Announcer No Announcements
BLUE Previous Required Point Self-Explanatory CP_A_1
Set the following output:
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnCapTeam2 Bomb_CapArea SetControlPoint CP_A_2 0.00 Yes

This effectively creates a capture point. This will display a red hologram over the point until blue captures the point, thus displaying a blue hologram. Additionally, the output sets the next capture point for the payload.

Note: The first capture point should have an index value of zero, which each following capture point increasing by +1.
Note: Warning Type should be set to No Announcements because announcement messages will be handled by the team_train_watcher.

End point cap

Set up this point's team_control_point entity with the same properties as CP_A_1, but with the following changes:

Property Name Description Value
Name Name of the entity CP_A_2
Print Name Name to display on HUD #Goldrush_cap_1_B
Index #ofCapPoint starting at 0 1
BLUE Previous Required Point Self-Explanatory CP_A_1
Don't forget, this entity needs the following output:
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnCapTeam2 Bomb_CapArea SetControlPoint CP_B_1 0.00 No

This sets up the capture point for the next round.

  • Set the following outputs on your second to last path_track. For this tutorial it is Track_A_42.

Set Track_A_42 Outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPass Bomb_CapArea CaptureCurrentCP 0.00 No
Io11.png OnPass Bomb_CapArea Disable 0.00 No
Io11.png OnPass Bomb_Light Stop 0.00 No
Io11.png OnPass Bomb_Train Stop 0.00 No
Io11.png OnPass cap_sound PlaySound 0.00 Yes
Io11.png OnPass CP_A_2 SetOwner 3 0.10 Yes
Io11.png OnPass Bomb_Train SetSpeedDirAccel 1 1.00 No

The last path_track should be underneath this one in order for the cart to ride down the chute like in Goldrush. This final track point, Track_A_43, should have the following Outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPass Bomb_Train TeleportToPathTrack Track_B_1 0.00 No
Io11.png OnPass Bomb_Train Stop Track_B_1 0.00 No
Io11.png OnPass Bomb_CapArea Enable 0.00 No

This will teleport the cart to the next round's starting track point, and enable it's push area.

Train Watcher

The next stage is to add in the train display, which is also used to tell when the train should start rolling back.

  • Create a team_train_watcher and name this Watcher_A. If you are creating a multi-round map, create a watcher for each round. Set the properties of the first round team_train_watcher to:
Property Name Description Value
Name Name of the entity Watcher_A
Start Disabled Self-explanatory No
Train to watch Self-explanatory Bomb_Train
Allow the train to recede Self-explanatory Yes
Train recede time (in seconds) Self-explanatory 0
Handle Train Movement Self-explanatory Yes
Default Speed Modifier Self-explanatory 1
Associated env_spark Self-explanatory Bomb_Sparks
Node that the path starts at Self-explanatory Track_A_01
Node that the path ends at Self-explanatory Track_A_43
Linked PathTrack 1 Self-explanatory Track_A_24
Linked CP 1 Self-explanatory CP_A_1
Linked PathTrack 2 Self-explanatory Track_A_42
Linked CP 2 Self-explanatory CP_A_2
Linked PathTrack 3 Self-explanatory
Linked CP 3 Self-explanatory
Min Speed for Speed level 1 Self-explanatory 1
Min Speed for Speed level 2 Self-explanatory 60
Min Speed for Speed level 3 Self-explanatory 80

Subsequent watchers should be created for each round with appropriately modified variables, such as the name, linked control points, and linked path tracks and nodes. The rest of the variables can stay the same.

Additional Effects

On Gold Rush and Badwater, additional effects are added to the cart, such as the dispenser beam, a flashing light, and sparks while the train is moving backwards along the track. Both are simple entities that start and stop depending on certain conditions.

Dispenser Beam

Now we will add a dispense beam effect to the train.

  • Create a mapobj_cart_dispenser entity and place it where you want the healing beam to come from. Set the following properties:
Property Name Description Value
Name Name of the entity Bomb_DispenseBeam
Parent Entity bound to Bomb_Train
Team Selt-explanatory Blue
Custom Touch Trigger Trigger zone Bomb_Dispense

Flashing Light

  • Create a info_particle_system and align it with the light on top of the bomb cart, and name it Bomb_Light
Property Name Description Value
Name Name of the entity Bomb_Light
Parent Self-explanatory Bomb_Train
Particle System Name Self-explanatory cart_flashinglight
Start Active? Self-explanatory No

Sparks

  • Create a env_spark entity at the bottom center of both rear wheels and name it Bomb_Sparks
Property Name Description Value
Name Name of the entity Bomb_Sparks
Parent Self-explanatory Bomb_Train
Spark Trail Length Self-explanatory Medium

Capture Bell

On Badwater and Gold Rush, a bell "ding" is used to announce point captures by BLU. Making this sound is simple.

Property Name Description Value
Name Name of the entity cap_sound
Sound Name Self-explanatory Hud.EndRoundScored

Final Terminus

Place for explode in Hammer

Now we are going to create a basic version of the explosion at the final terminus. KaBOOOOOOM!

Final Capture Point

  • Make sure your final team_control_point has its properties properly configured, with Index # reflecting the highest number of total capture points.
  • Also, the print name should be increased correctly in sequence,
  • Additionally, BLUE Previous Required Point 1 should reflect the previous point's entity name.
  • Finally, set the following Flags as checked:
Flag Name Description Value
Start with model hidden Self-explanatory True
Disable Shadow Self-explanatory True
Disable Sounds Self-explanatory True

Explode Pit

Pit Model

  • First you should create a pit for the cart to fall into for the final explosion. After you've created the brushwork, cover the pit with the following models.
  • Create a prop_static with World Model models/hybridphysx/badwater_destruction_before.mdl
  • Make another with World Model models/props_farm/sewer_cap001a.mdl.

Doors to Pit

  • Create two brush-entities func_door, with the material glass/glasswindow002a on the upper face.

Parameters for two func_door:

Property Name Description Value
Name Self-explanatory cap_door
Speed Self-explanatory 700
Move Direction (Pitch Yaw Roll) Self-explanatory 0 270 0
  • In Flags check Touch Opens to false and check Toggle to true.
  • On one of two doors create the outputs:
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnFullyOpen cap_door kill 0.00 No

It will destroy the door when it's fully open.

  • In the pit create a brush-entity trigger_hurt with the parameters Damage - 1000, Damage Cap - 1000.
  • Create a brush-entity func_nobuild on the upper doors with parameter Team - Any.

Barrels in Pit

  • Create 10-15 entities prop_dynamic_override with WorldModel models/props_badlands/barrel03.mdl and Name - End_Barrels

Final Explosion

Final explode (ingame) (dpl_mine_b2)

Parameters of the first:

Property Name Description Value
Name Self-explanatory Cart_tip
SoundName Self-explanatory Cart.Falling

Parameters of the second:

Property Name Description Value
Name Self-explanatory pre_kaboom
SoundName Self-explanatory Cart.Trigger

Parameters of the Third:

Property Name Description Value
Name Self-explanatory kaboom
SoundName Self-explanatory Cart.Explode

Additionally, create an env_shake entity with the following properties:

Property Name Description Value
Name Self-explanatory kaboom_shake
Amplitude Self-explanatory 16
Effect Radius Self-explanatory 500
Duration In seconds 1
Frequency Self-explanatory 150
Set the following Flags as checked:
Flag Name Value
Global Shake True
In Air True
Property Name Description Value
Name Self-explanatory pit_effect
Particle System Name Self-explanatory cinefx_goldrush
Pitch Yaw Roll (Y Z X) Self-explanatory -90 0 0
Property Name Description Value
Name Self-explanatory KaBoomZone
Start Disabled Self-explanatory Yes
Set the following outputs:
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouch  !activator SetHealth -1000 0.00 No

Now we are ready to address the outputs for the final path_track.

  • Set the outputs as follows:
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPass cap_door Open 0.00 No
Io11.png OnPass Cart.tip PlaySound 0.00 No
Io11.png OnPass Bomb_Light Stop 0.00 No
Io11.png OnPass CP_C_2 SetOwner 3 0.10 No
Io11.png OnPass Bomb_Train kill 0.00 No
Io11.png OnPass Bomb_Const Break 0.01 No
Io11.png OnPass pre_kaboom PlaySound 0.50 No
Io11.png OnPass Bomb_CapArea CaptureCurrentCP 2.00 No
Note:This tutorial is assuming the final terminus takes place on the second point of the third round, and hence CP_C_2 is SetOwner to 3. Replace the capture point name as necessary.

Finally, create a trigger_once brush at the bottom of the pit where you want the cart to explode.

  • Set the following properties:
Property Name Description Value
Name Self-explanatory Final_Trigger
Start Disabled Self-explanatory No
Filter Name Associated Filter Filter_Cart
Add the following outputs:
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger kaboom PlaySound 0.00 No
Io11.png OnTrigger kaboom_shake StartShake 0.00 No
Io11.png OnTrigger pit_effect Start 0.00 No
Io11.png OnTrigger end_barrels kill 0.00 No
Io11.png OnTrigger Bomb_CapArea kill 0.00 No
Io11.png OnTrigger Bomb_Model kill 0.00 No
Io11.png OnTrigger KaBoomZone Enable 0.00 No
Io11.png OnTrigger KaBoomZone Disable 0.10 No
Set the Flags to only Physics debris true, with every other flag false.

Timeline

So what happens is:

0.0:

  • open doors to pit
  • destroy Bomb_Train
  • cart tipping sound played
  • cart effects disabled

0.01:

  • detach and fall cart's model

0.5:

  • "beep" sound played

On Contact with Trigger:

  • play ka-boom sound
  • play ka-boom effect
  • ka-boom shakes screen
  • destroy barrels
  • destroy cart's model
  • capture final CP
  • destroy Capture Zone
  • activate killing zone

After Contact (.1 seconds):

  • deactivate killing zone

You should now have at least a fully working 1 stage round of payload style game play, if you have taken in this tutorial fully you should be able to change the number of rounds and capture point to anything you need.

See also