Command Point System

Warpath Style

This tutorial will show you how to make a map like 'warpath' where the teamshave to take control of 5 command points in order.

This is the hardest map I have had to make so far, so if you are going toattempt to make one of these maps, be prepared to spend a while doing it, andjust follow it slowly, making sure you cover everything in it.  Again, likein the other tutorials, I won't cover things such as sending messages toplayers, or playing sounds when events like capturing points take place. Instead, refer to the tutorial about it.

Overview

In this tutorial we will be creating 5 command points, each with their ownchanging signs and covers.  This is a time consuming and complicatedprocess, so make sure you have time to do it all at once, or you may get lostwhen you come back to it.

Specifics

First of all, we will create the basic brushes used to indicate each commandpoint.  We'll make them 128x128, but only 4 units high.  Find asuitable texture and create the block, which should be placed on thefloor.  Then make another block which will be used as a cover the same sizeas the first, but place it directly underneath the existing block. You then need two more brushes, one for the red status indicator and one for theblue status indicator.  Again, place the blue one directly beneath thecover, and the red one beneath the blue one.  They could all go in the samespace, but I found it easier to make them this way to enable easier editing ofeach.  Each of these blocks should be 4 units high, so you now have a stackof 4 blocks 16 units high, with only the top one, the basic command point, abovethe floor.  Turn the 3 brushes below floor level into func_platentities.  Give the cover a movement altitude of -12, the blue brush -12and the red brush -16.  This makes them all move to the correct positionwhen they are triggered.  You also need to set the flag 'toggle' to beon.  Next, name each of them in the following way:

Command Point Cover Blue brush Red Brush
1 cp1cover cp1blue cp1red
2 cp2cover cp2blue cp2red
3 cp3cover cp3blue cp3red
4 cp4cover cp4blue cp4red
5 cp5cover cp5blue cp5red

Now is a good time for a break, if you need one.  ( I'm having one, andI'm only writing the tutorial, not following it )

Back to work ( bear with me on this section, I am writing it at 1:20 am, so Imay start to waffle a bit )...
For each of the command points, we need to create the following entities:

Phew, I seemed to remember it being more than that, so if this doesn't work,tell me and I will check ;-)

I will do the middle command points first, ie 2, 3 & 4 because they allwork the same way, but 1 & 5 have to be slightly different because they arefor when a team wins.

We'll start with cp2 and then copy the entities we used for 3 and 4, andchange some of the properties.  By the side of the various covers we havecreated for cp2, create 2 multi_managers, and 4 trigger_relays.  Also,create 2 i_t_g s which have a height of 4 units.  These need to be placedabove cp2, but with a gap of 4 between them and the brush indicating the commandpoint.  This is so that when the cover is activated, it will cover thei_t_g s so that the point cannot be recaptured while the cover is inplace.  Name one multi_manager 'multi2blue' and one 'multi2red' ( withoutthe quotes ).  You then need to name the 4 trigger_relays as 'cp2blueon','cp2blueoff', 'cp2redon' and 'cp2redoff' ( again without the quotes ). These will be used to move the status indicators into position.  Finally weneed to set up the i_t_g s.  To do this, set the following properties ineach:

Property Blue i_t_g Red i_t_g
Goal activation bitfields Player touch Player touch
Team Blue Red
If goal # inactive 11 23
Target multi2blue multi2red
Remove goal 22 12
Restore goal 12 22

Now we need to set up those multi_managers.  Open up 'multi2blue' andadd the following keys into it:

key value what it does
cp2blueon 0 activates the blue status indicator
cp2redoff 0 deactivates the red status indicator
cp2cover 0 turns on the cover
cp2cover#1 15 turns off the cover after 15 secs

Now the same for 'multi2red':

key value what it does
cp2redon 0 activates the red status indicator
cp2blueoff 0 deactivates the blue status indicator
cp2cover 0 turns on the cover
cp2cover#1 15 turns off the cover after 15 secs

Now, in each of the trigger_relays, set up the targets as the appropriatecovers as follows:

and also make sure the trigger states are correct:

Finally we need to make the goals that were mentioned earlier on, 12 and22.  These are just indicators as to who owns the CP, and are used by thei_t_g s to see who owns it.  Create two info_tfgoals above the commandpoint and make one as a blue flag and one as a red flag (set the model tomodels/flag.mdl and set the appropriate skin for it).  Make the blue flaggoal # 12 and the red flag goal # 22.  Set the 'goal activation bitfields'of each one to none, so there is no way of triggering them.  Also, the'goal initial state' of both of these needs to be set to 'removed' as no one'owns' the capture point at the start of the round.  Also make the blueflag a member of group 16 and the red flag a member of group 26 ( using the goalgroup # property ).

That's it for CP2.  We now need to do the same thing for cps 3 and4.  Create all of the same entities again ( or just copy these ones andchange the appropriate keys ).  The things you need to change are thevarious names and targets, ie the parts that currently say 'cp2' need to bechanged to 'cp3' and 'cp4'.  Also, in the i_t_gs, you need to change the'if goal inactive' and 'restore goal' and 'remove goal'.  These should beas follows:

CP3:

key Blue Red
if goal inactive 12 24
restore goal 13 23
remove goal 23 13

CP4:

key Blue Red
if goal inactive 13 25
restore goal 14 24
remove goal 24 14

And that's it for those.  You also need to change the goal #'s of the'flags' which are at each point, ie on CP2 the blue flag was 12 and the red flagwas 22.  On CP3 the blue is 13 and the red 23, on CP4 the blue is 14 andthe red is 24.  That's all there is for these command points ( unless Iremember something at a time when I can actually keep my eyelids open ).

Well, it's now 1:40am, so I think I'm going to go to bed, and do some more ofthis in the morning.  I'm off now to read some more of my current StephenKing novel, Desperation.  I know it's no use saying good night to anyonewho is reading this, as you are probably reading it during the day, but'goodnight' and I'll see you in the morning.

Ok, it's now a sensible time to write something like this, so on I go...

We'll now look at creating CP1 and CP5.  These two are similar to theothers, but not quite the same.  First of all we will deal with CP1.

Start off by copying the two multi_managers from CP2 and the 4 trigger_relaysfrom CP2.  Rename them all to fit in with CP1, and don't forget to changethe keys in the multi_managers.  Also copy the two info_tfgoals which actas the flags to show who owns the point.  Make sure the blue flag is goal #11 and the red flag is goal # 21.  Check to make sure you have put these inthe correct groups as well, blue flags are 16, red flags are 26.  Nowcreate an i_t_g which will serve as the red capture detection.  We don'tneed a blue one, as they never need to capture this point.  In the i_t_g,set up the following properties:

We now need to edit the red multi_manager, ie multi1red.  Add these twokeys:

We will now create the 'redwin' entity, it is an info_tfgoal.  Create itand set the following properties:

This would also be the entity where you add the scores for capping all thepoints.

The last thing at this CP is to create an entity which will display the blueflag when the points are reset.  Create an info_tfgoal and set theseproperties:

Now for the same but with CP5.  Copy and change all of the entities fromCP1 to work with CP5, ie change all the names and the keys, and don't forget themulti_managers.  For this CP, the blue flag should be 15 and the red flag25.  Make sure you rename redwin to bluewin and also cp1blue tocp5red.  This entity also needs the two properties with '11' in to bechanged to '25'.  Remove the two properties in the red multi_manager,redwin and resetgame, and add these to the blue multi_manager:

The i_t_g also needs a bit more attention, make sure the following are set:

That should be it for CP5, so long as you changed all the details listedabove.  Just a few more entities to go now, the first of which is resetgame. This is a multi_manager, so create one now, and set the following:

Now for the two 'kill' entities, these simply remove the flags.  Createtwo info_tfgoals and set the following:

Property Blue info_tfgoal Red info_tfgoal
Name killblue killred
Goal activation bitfields 0 - none 0 - none
Remove goals in group #  16 26

Well, I think that may be it.  I'm not entirely sure, so if people haveproblems, please contact me as soon as possible, or post on the tutorialforum,  so I can sort them out.

Az.

Back to tutorials...

© 2000-2001 TFX-Soft, all rights reserved