SCTF: Sequential Capture The Flag

Tutorial collection, comprehensive listings on main site.

SCTF: Sequential Capture The Flag

Postby Tutorial on Tue Jan 01, 2008 8:03 pm

category
Team Fortress 2

description
Set up multiple Flags that players have to secure in order.

keywords
tf2, team fortress 2, ctf, capture the flag, sequential.

This is a tutorial on how to create Sequential Capture the Flag, in TF2 All you need is at least 2 flags per team, this example will show you how to do 4 flags per team.

If you feel comfortable with the basics, or if you'd like to make ctf, more challenging and more complex, then this tutorial will get you in the right direction. Valve has already included the ability for sequential ctf, it's only in how it is setup that it gets confusing.

Before you even try to do this in your map, you have to remember one thing: The players need to know where to go, and when! One flag is easy, when you have up to 4, as this tutorial will show, you can confuse players easily. If you try this concept, you must include identifiers, so players know what flags are active. This is explained in detail as you read this tutorial. The way to identify the active flag can be done by a sign, hud element, and or sound.

The source files, and map can be downloaded here.

Place the .rar in the following directory: C:\Program Files\Steam\steamapps\(my_user_name)

Image

This will install the .vmf file into your sourcesdk_content/tf/mapsrc folder and the custom images for the ident_signs to their directory. (toy/materials/props... because these are used in the mod i'm working on, feel free to use these images, or change the directory if needed. Normal maps are included as well. By modifying the stock gate overlays, i've included flag number overlays for use at the flag zones, as shown below: 8 total

Image

You'll need pakrat for adding these files to your map, for distribution purposes.

Also included are 2 prefabs, one for each team:

blue_flag_ident_sign.vmf
red_flag_ident_sign.vmf

If you have installed this as shown, you'll have everything in place. Feel free to open up the .vmf file in hammer as we go through this...

The map included has support for up to 4 flags on each team, and it will even revert back to flag 1 for an endless amount of flag captures. I'll use the blue team in this tutorial, you can see everything else, which is the same for red in the map.

This is how the first capturezone ( blue_intel_cap )on blue should look:

Image

The func_capturezone only needs to disable itself and enable the next on that flag's capture.

This is how the first flag ( blue_flag1 ) on blue should look:

Image

You'll notice i have a 10 second delay, before the second flag is spawned. This is completely optional, i have made it this way, so the opposing team is not waiting at the second cap, grabbing your intel before you have a chance to at least move in that direction.
I'll get into the _cap_ident outputs once we finish the basics on flags, and capturezones.

This is how the second capturezone ( blue_intel_cap_2 )on blue should look:

Image

This should be getting alot easier for you now, basically the same thing as before, just going up one, and disabling the prior cap.

This is how the second flag ( blue_flag2 ) on blue should look:

Image

Remember to make sure you are doing everything in sequence.

This is how the third capturezone ( blue_intel_cap_3 )on blue should look:

Image

blah, blah, blah

This is how the third flag ( blue_flag3 ) on blue should look:

Image

Now you'll see i have an extra output. I thought it would be a good feature to have the last flag more difficult to capture. In this example you cannot get near the last flag, untill after the third flag is captured. This allows time for the other team to build up a defense. This is purely optional, i just have it setup this way for the toysoldiersmod, and your map would have to be made to fit this scheme, to work well.

This is how the fourth capturezone ( blue_intel_cap_4 )on blue should look:

Image

You'll notice here that i call back to the first capturezone, if you wanted to do more than 4 flags per round. If you're only doing 4, don't worry, this will still work.

This is how the fourth flag ( blue_flag4 ) on blue should look:

Image

A little more going on here, same principle. This also allows the respawnvisualizer to be reenabled. Now you are back to the first flag, or it's the end of the round, your choice in the server config. One thing i would recommend is the following: Don't force the count in your map! If you only have 2 flags for example, make it revolve back to 1 after flag 2.

Now for the flag identifiers. I have included support for spawn room idents in this map. This is based off the included prefabs. The same principle can be added to the flag rooms or other areas of your map, it's all up to you.

Here you'll see the preliminary ident_sign i made up for the spawn rooms, blue ( blue_flag_ident_sign.vmf ) for this example:

Image

Each of the func_brushes are named:

blue_cap_ident_1
blue_cap_ident_2
blue_cap_ident_3
blue_cap_ident_4

...and the same for the red sign accordingly.

The sign is made up of brushes, simple and easy to identify. You can use a func_brush as i did, due to the ability to support the Start Disabled function. *You need this function so that when the map starts you can have an active first flag, and have it called by each flag when captured. Remember that this first func_brush needs to be set as: StartDisabled:No In this example, you have a sign that shows the player what flags they currently need to protect. You can take this concept further by adding ident_signs to each flag room, so in case a player goes to that flag, and there is nothing there, he or she could look at the sign and go the active flag.

This is the second func_brush, same as the first, but StartDisabled is Yes!

Image

The second identifier and all afterwards have to be set to Start Disabled:Yes

There are no outputs to set, you'll see the inputs in the map file, as they are called from the Oncapture event outputs for each flag. What you should do is make the func_brushes color correct, the colors i used, that are the rgb outputs from each team logo's are:

Red: 163 87 75
Blue: 75 113 128

There are other ways to make the identifiers, this is just an example. In a compiled version you'll get a glow effect using the included example. If you use a spotlightfx render, you'll get a flashing func_brush as well. Just remember that you need the StartDisabled option on the brush or ent that you would want to use, for this to work correctly.

Here is an in-game shot using the red ident sign ( prefab ) that's included:

Image

This is a work in progress, to add more options to standard ctf gameplay. I welcome any thoughts on this concept. This gamemode will hopefuly add more excitement to the standard versions you are used to.

I'd like to have the community add to, and improve this gametype, i'd adds alot to standard ctf. Please contact me if you'd like to collaborate on this. I have also noticed that this is not viewable by, unregistered users. Hopefully this can be added to the regular tutorial thread after some tweaking.

I'm hoping to have a playtest on the first map in http://toysoldiersmod.com available in the next week or so, so you can see this in action.

I'm finishing up a hud system for better "ident" of what flag is active, to further make things easier for players. You can easily add custom sounds, ie: 1-beep, 2-beep... etc for each flag, using an ambient_generic. If you do this, you must include the outputs within the item_teamflag. This gametype promotes more team communication, and a good alternative to standard ctf, i hope you enjoy it. For this to be even easier, i would appreciate some thoughts on how the signs should look, and act. This way mappers can just use the same prefabs. This way there is some type of universal look to them. I would also like to do a collaboration on the hud elements, contact me if you'd like to do some work on a matching hud system for this gametype.

I'm calling this: Version 1.0, as i'm sure there are other options that could be added to this.

Kernel
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby nub on Wed Jan 02, 2008 6:27 pm

It's a very interesting concept and it seems to be well done in your part. This would be way more challenging.

But the only problem I see with this is prolonged matches and people getting sick of trying to win. Maybe if the server had it set so you only had to win a single round to win the entire match.
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Re: SCTF: Sequential Capture The Flag

Postby fartron on Tue Jan 29, 2008 3:19 am

This had been my first idea for a map, but I'd decided it was too difficult to tackle right away. I'm extremely glad someone has worked out the method, I may incorporate it sooner than I'd expected. Thank you!
fartron
Dumpling
Dumpling
 
Joined: Tue Jan 29, 2008 3:18 am

Re: SCTF: Sequential Capture The Flag

Postby jhonny_paradox on Sat Feb 02, 2008 6:59 am

This is awesome, I have the perfect idea for a map to utilize a SCTF gametype!
jhonny_paradox
Regular
Regular
 
Joined: Mon Jan 28, 2008 12:22 pm

Re: SCTF: Sequential Capture The Flag

Postby agra on Tue Apr 01, 2008 1:45 am

As of this posting time and date, the Sequential CTF Behavior no longer works as described in the Tutorial.

Specifically, the HUD pointer does not point to the correct func_capturezone after the first flag is returned.

I've made 2 additional test maps from scratch to compare with the sctf_example.vmf (from the tutorial) to verify the results, and they all act the same. To be clear: The sctf_example.vmf does not work properly / as described / as expected.

After the first flag is obtained and returned to the first func_capturezone, the next flag is activated, can be picked up, and can be returned to the next func_capturezone, BUT the HUD points to the wrong func_capturezone. It is 100% consistently wrong after the first one. =) The HUD is never correct after the first flag, which is obviously unacceptable for a real map.

Not sure if this is new buggy behavior, but it's certainly broken today. Please PM me if you can prove me wrong, and I'll edit this post.

Update: I've attached a quick work-around example .VMF, because I really needed an alternative. =) The work-around uses templates and entity creators.
sequential_flag_example.rar
(11.88 KiB) Downloaded 170 times
agra
Regular
Regular
 
Joined: Mon Nov 12, 2007 1:16 am
Location: Hammer

Return to Tutorials

Who is online

Users browsing this forum: No registered users

cron