[Tutorial] CTF with Forward Spawns (For Large Maps)

SaerisHawkeye

L1: Registered
Jan 17, 2008
22
0
This tutorial will walk you through what you need in order to a make with the following work correctly:

-2 Bases with Respawn Areas
-2 Flags and 2 Capture Zones
-2 Forward Bases with Respawn Areas
-1 CP to control Forward Spawning and Flag Capturing

Now, this setup may seem a bit odd, and at first, you may not understand why you would set it up this way, however, this tutorial will explain the gameplay involved with this setup.

Before we continue, consider the following as your standard layout:
[Red Respawn=Red Flag/CapZone]<->[Blue Forward Spawn]<->[Central CP]<->[Red Forward Spawn]<->[Blue Flag/Capzone=Blue Respawn]

On a map layout such as this, initial fighting will focus in the center for control. Once control is taken, in this example by Blue, then Blue will by forced into an Offensive and Red will be forced into Defensive. At the same time, however, Blue's base will be very vulnerable, thus making it more difficult to capture the flag. If at any time should Red take the CP, then the roles of each team will be reversed.



Alright, down to making this work. I'd hope that by this far into the tutorial, I've scared away anyone who hasn't made a map before, and for those of you stubborn enough to continue reading, I'll refer you to what you should know in order to set this up beforehand.

First, you can either design your map and then place everything mechanics related on that map, or, you can start off doing so. In any event, I assume you'll set up at least Four complete Respawn Rooms accross the map. Please refer to http://developer.valvesoftware.com/wiki/TF2/Creating_a_Spawnroom for a complete guide to making a fully functional respawn room.

Once this is laid out, next thing you want to do is make a flag and a capture zone in each base. Please read this tutorial for setting those up: http://developer.valvesoftware.com/wiki/TF2/Flag_Based_Goal_Systems

And finally, I want you to follow this guide for creating only one CP in the center of the map: http://developer.valvesoftware.com/wiki/TF2/Creating_a_Capture_Point

Once these are placed, we're going to assign these values to each (leave any unassigned values at the default unless you know what you are doing):

Blue Base Respawn Area:
Func_Respawnroom -
  • Name - Blue_Spawn
  • Team - Blue
  • Start Disabled - No
Info_Player_Respawn -
  • Blue_Spawn_Props
  • Team - Blue
  • Start Disabled - No
Func_Regenerate -
  • Name - Blue_Resupply
  • Team - Blue
  • Associated Model - Blue_Locker
Prop_Dynamic -
  • Name - Blue_Locker

Blue Flag/Capture Zone:
Func_CaptureZone -
  • Name - Blue_Capzone
  • Start Disabled - Yes
  • Team - Blue
Item_Teamflag -
  • Name - Blue_Flag
  • Game Type - CTF
  • Team - Blue
  • Start Disabled - Yes

Red Forward Spawn:
Func_Respawnroom -
  • Name - Red_Forward_Spawn
  • Team - Red
  • Start Disabled - Yes
Info_Player_Teamspawn -
  • Name - Red_Forward_Spawn_Props
  • Team - Red
  • Start Disabled - Yes
  • Assosciated Control Point - Center_CP
Func_Regenerate -
  • Name - Red_Forward_Resupply
  • Team - Red
  • Associated Model - Red_Forward_Locker
Prop_Dynamic -
  • Name - Red_Forward_Locker

Central CP:
Trigger_Capture_Area -
  • Name - Center_CP_Capzone
  • Control Point - Center_CP
  • Can Red Cap? - Yes
  • Can Blue Cap? - Yes
Prop_Dynamic -
  • Name - Center_CP_Prop
Team_Control_Point -
  • Name - Center_CP

Blue Forward Spawn:
Func_Respawnroom -
  • Name - Blue_Forward_Spawn
  • Team - Blue
  • Start Disabled - Yes
Info_Player_Teamspawn -
  • Name - Blue_Forward_Spawn_Props
  • Team - Blue
  • Start Disabled - Yes
  • Assosciated Control Point - Center_CP
Func_Regenerate -
  • Name - Blue_Forward_Resupply
  • Team - Blue
  • Associated Model - Blue_Forward_Locker
Prop_Dynamic -
  • Name - Blue_Forward_Locker

Red Flag/Capture Zone:
Func_CaptureZone -
  • Name - Red_Capzone
  • Start Disabled - Yes
  • Team - Red
Item_Teamflag -
  • Name - Red_Flag
  • Game Type - CTF
  • Team - Red
  • Start Disabled - Yes


Red Base Respawn Area:
Func_Respawnroom -
  • Name - Red_Spawn
  • Team - Red
  • Start Disabled - No
Info_Player_Respawn -
  • Blue_Spawn_Props
  • Team - Red
  • Start Disabled - No
Func_Regenerate -
  • Name - Red_Resupply
  • Team - Red
  • Associated Model - Red_Locker
Prop_Dynamic -
  • Name - Red_Locker



Aight, now that we have all the entities set up with the proper values, we're now going to go back to the Center_CP_Capzone entity and assign the following outputs:

OnTeamCap1 - Center_Cp_Prop - Skin 1

OnTeamCap1 - Red_Spawn_Props -Disable
OnTeamCap1 - Red_Forward_Spawn_Props - Enable
OnTeamCap1 - Blue_Spawn_Props - Enable
OnTeamCap1 - Blue_Forward_Spawn_Props - Disable
OnTeamCap1 - Red_Spawn - Disable

OnTeamCap1 - Red_Forward_Spawn - Enable
OnTeamCap1 - Blue_Spawn - Enable
OnTeamCap1 - Blue_Forward_Spawn - Disable

OnTeamCap1 - Red_Flag - Disable
OnTeamCap1 - Red_Capzone - Disable
OnTeamCap1 - Blue_Flag - Enable
OnTeamCap1 - Blue_Capzone - Enable

OnTeamCap2 - Center_Cp_Prop - Skin 2

OnTeamCap2 - Red_Spawn_Props - Enable
OnTeamCap2 - Red_Forward_Spawn_Props - Disable
OnTeamCap2 - Blue_Spawn_Props - Disable
OnTeamCap2 - Blue_Forward_Spawn_Props - Enable

OnTeamCap2 - Red_Spawn - Enable
OnTeamCap2 - Red_Forward_Spawn - Disable
OnTeamCap2 - Blue_Spawn - Disable
OnTeamCap2 - Blue_Forward_Spawn - Enable

OnTeamCap2 - Red_Flag - Enable
OnTeamCap2 - Red_Capzone - Enable
OnTeamCap2 - Blue_Flag - Disable
OnTeamCap2 - Blue_Capzone - Disable

These outputs basicly determine the rules of the entire map, and it is imperative that you get all of these values correct in order to have a working map.

Theoretically, you can use this setup with multiple CP's, but for each CP, you need to add about another 24 values to each. The order those points are captured in will determine where a team will spawn at, where the values on each cp will disable all the other spawn areas while at the same time enabling the spawn area associated to it.

I assume that by using logic entities, you can instead of enabling/disabling the flags and their capzones, send information to a logic entity, and it will determine whether a team can capture or not (assuming they have all the CP's, for example).

Also, I assume that by using Trigger_Proximity ( http://developer.valvesoftware.com/wiki/Trigger_proximity ), you can define the effective areas of a respawn room, whereby the play will respawn at the closest respawn room on their death. This will need to be covered in another tutorial, however.


Anyways, I hope this tutorial will be of help to all of you looking to add control points and multiple respawn areas in a CTF based map.
 

PandaN

L1: Registered
Jan 16, 2008
30
0
Funny you write this just now - I've been asked to make a ctf/push map ala
[blue capture] -> [red spawn] ->[centralcp/flag] -> [blue spawn] -> [red capture]

Where the central cp being captured drops the ball, or flag

Great minds think alike? :p
 

l3eeron

L8: Fancy Shmancy Member
Jan 4, 2008
593
88
thanks for the great tut... added to favs

+w00t
 

l3eeron

L8: Fancy Shmancy Member
Jan 4, 2008
593
88
I have a question I think you might know off the top of your head.

Im confused on blu=team1 or blu=team2
 

suzzanuzza

L1: Registered
May 18, 2009
44
1
this doesnt make sense. according to your tutorial, the disabled spawnroom will just be a room with no purpose. what if players try to change classes in this disabled spawn room? the only way to solve this problem would be to lock the spawn room when it is disabled. but that wouldnt work either because what if it gets locked when someone is inside? this is a terrible method for forwarding respawn rooms. all you really have to do to achieve the forwarding of spawn is set the "associated control point" on your info_player_teamspawns to the correct point. so if you set the "associated control point" of your info_player_teamspawn(located inside respawn room 2) to "control point c", players will automatically be forwarded to repawn room 2 when they own "control point c".
Thats all there is to it. no inputs or outputs needed. But make sure you set the "associated control point" of your starting info_player_teamspawn to "control point A"(or whatever your first control point is called.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
I have a question I think you might know off the top of your head.

Im confused on blu=team1 or blu=team2

1 is usually nuetral, 2 red, 3 blue.