Rock2 Style map
This tutorial will show you how to create a map like rock2, where you have to
get an enemy key and take it to a switch, releasing the gas.
Get my example map here. This map
contains the very basics needed to create a gas map, not all of the areas are
covered by the trigger_hurt and there are no backpacks. It would need
quite a bit more work to turn it into something like rock2, eg the way people in
the other gas chamber don't get hurt when the door is closed, but they do when
it is open. I haven't yet had time to experiment with this, but I will do
In this map, you will need ( one for each team ):
- A spawning room, where the team can spawn and collect ammo, etc. See
the tutorials on spawn points and backpacks.
- A key to collect. This is an item_tfgoal which can be picked up and
- A place to take it to. This is defined by an i_t_g which is a brush
based version of an info_tfgoal. This will set off various triggers
- Various triggers and info_tfgoals. These will be triggered by the
corresponding i_t_g and will control things such as the countdown, doors
opening and giving points to teams. Some of the info_tfgoals will be
used for gas suits.
- trigger_hurt. This is the most important thing in the level, as it
is what actually does the killing.
- You will also need to place an info_tfdetect in your level. Go here
to see how to use this.
First of all, create your map, including the following areas:
- Spawn rooms for both teams.
- A place for the keys to reside when they are not being carried and after
they have been dropped and returned.
- A place where you have to take the key to. This room will not
usually be covered by the:
- trigger_hurt. Cover the parts of the level that you want to kill
people in with this entity. In rock2, it covers the entire level apart
from the water, the gas chamber and the wardens office.
- Small rooms in which to place the protective suits.
We will now make the blue key and red drop-off point, both of these being in
the blue base of course. First of all, create an item_tfgoal where you
want the key to be. You then need to change the following properties:
- Goal #: set this to 1, it is just used to identify the goal.
- Model path/name.mdl: use 'models/keycard.mdl'. You can, of course,
use other models. You can find out which models are available for use
by using a pak browser, or a model viewer.
- Model skin: These are a bit strange, you have to play around with
the value until you get the right skin, as they are different for some
- Goal Activation Bitfields: Add up the bits you want, I find 4756 works
well in this situation.
- Team: Set it to red, we want them to be able to pick it up, not the blue
- Team Message: Set this to something like 'Your team has the enemy key'
- Non-Team Message: Set this to something like 'The enemy has your key'
- Message to player: Use a value such as this 'You have the enemy key\nTake
it to their gas chamber'
- Pause (stays on ground) seconds: This is the delay before it is returned
after someone drops it, set it to 60
- msg, death drop, owner team: Use something like 'Your team lost the enemy
- msg, death drop, non owners: Similarly 'The enemy lost your key'
- Highlight HUD items bitvalue: 131072 - Blue. This indicates to the
player who picked it up that they are carrying it.
That's it for this item_tfgoal. We now need to create the drop off
point for it. This is done by creating a brush in the area where you want
the player to be to drop off the key. You then turn it into an i_t_g,
which is a brush based version of an info_tfgoal. The following propertied
now need to be changed:
- Goal Activation Bitfields: 1 - Player touch
- Team: Red
- Has item #: 1 (remember we gave the key a value of 1, this makes it only
work if the player is carrying the key)
- Target: multiblue - this is the name of a multimanager which we will use
to create the countdown, and the doors opening and closing.
- Return item #: set this to 1, so the key gets returned when it is used to
activate the i_t_g
- Red point gain: 10 - give the red team 10 points when they trigger the
That's all for that entity. I will now show you how to set up the
multimanager. Create one, and set the following properties (you have to
turn off smartedit to do this, and use the 'add key' button):
- targetname: multiblue
- warningmsg: 0
- closebluedoor: 0
- counter5: 15
- counter4: 16
- counter3: 17
- counter2: 18
- counter1: 19
- killon: 20
- killoff: 20.1
This triggers a series of events, I will go through them in order.
- warningmsg: this targets an info_tfgoal which uses the message properties
to display a message like: 'Warning, Nerve Gas Released\nGet into a secure
- closebluedoor: this targets a trigger_relay which in turn targets the blue
gas chamber door, making it close.
- counter(5-1): These are all info_tfgoals which display a countdown to the
players, ie, 5, 4, 3, 2, 1 at 1 second intervals.
- killon: targets a trigger_relay which targets the trigger_hurt and turns
it on, killing anyone in it.
- killoff: targets another trigger_relay which targets the trigger_hurt,
turning it off again a fraction of a second later, making it safe for people
to move around the level again.
Now that that is done, you can move on to the red key and the blue capture
point. They are done in the same way, but you have to swap all the
references to blue and red, and don't forget to change the keys 'goal #' to 2
and the 'item to return' in the i_t_g to 2. All of the points covered in
this tutorial have been put into practice in the example map, which has a link
to it from the top of this page.
This tutorial has covered making the basics of a rock2 style map. You
can also put other events like sounds in, such as using the vox to speak to the
players when the keys are picked up or dropped etc. These are done by
utilising the speak properties in the various info_tfgoals. You can also
use a speaker triggered from the multimanagers to turn on a siren at the
relevant times. I may come back and show you how to do this, but first I
am going to work on the other tutorials, so people can carry on with other maps
Back to tutorials...
© 2000-2001 TFX-Soft, all rights reserved