Introduction to Counter-Strike mapping
Before we start, make sure you have familiarised yourself with the
In The Beginning series of tutorials. I know you're thinking, "Half-life? But I want to map for Counter-Strike!" sure, but the basics are the same and the idea behind this tutorial is to show you the differences.
Spawn points
There are two things that
must be in a Counter-Strike map:
- At least one `info_player_start`: The Counter Terrorist (CT) spawn point.
- At least one
info_player_deathmatch
: The Terrorist (T) spawn point.
If you only put the
info_player_start
in the map, then no-one else will be able to join the map. It is a good idea to place about 10 of each type of
info_player_
entity in your map. It is up to you how many you want to use, but 10 seems to be a common figure, and make sure they are not to close together or they will spawn frag each other. Give them a little space, about 32 units on either side and about 8 units off the floor. It's imperative that the entities are not intersecting geometry in anyway.
Buyzones
There is also an entity that is normally used with the Spawn points and that is a
func_buyzone
. The buyzone is a brush based entity that defines an area where the teams can purchase weapons and equipment.
The buyzone is not absolutely neccessary, as the
info_player
entity will define a small area at its location that acts like one - but you can't change the size, which is why a specific buyzone brush is recommended. If you use a buyzone, then the spawn point will not act as a default buyzone. This is good for when you want the players to travel to the buyzone before being allowed to buy weapons. If you're making a fight yard map or another map that you don't want buying to be allowed in, you can place the buyzone somewhere inaccessible to prevent the spawn points acting as buyzones.
Map types
There are a few types of maps out there for Counter-Strike. It is a good idea to know what type of map you are making before you start. The mapname prefix normally gives you an idea of what type of map it is going to be:
- cs_mapname: Hostage rescue
- de_mapname: Defuse
- as_mapname: Assassination (VIP escort)
- es_mapname: Escape (Note: No official CS maps for this mode and it doesn't work very well)
Here are a few unofficial map types made by the community over the years:
- fy_mapname: Fight yard - a map with no buy zones, but rather all gun types are spawned on the floor to be picked up.
- aim_mapname: Aim map - very similar to fight yard, but only one or two gun types are available. Used to help practice using a particular gun.
- awp_mapname: An aim map, but everybody has an AWP sniper.
- ka_mapname: Knife arena - a mode with no guns or buyzones. Players spawn and fight with only knives.
- kz_mapname: A climbing or jump map - players are presented with a set of tricky jumps and race to the top.
- surf_mapname: Surf map - takes advantage of an oddity in player movement which allows players to glide across angled surfaces.
It is possible in some cases to support hybrid gameplay by combining game modes into one map, for example a
csde map would have both hostages and bomb sites. However combining types is uncommon since it's unpopular with players. CS wasn't designed with this in mind - if you want to release multiple game types for your map, you should probably compile separate versions of it for each mode.
Creating a hostage rescue (cs_) map
See also:
hostage_entity (Counter-Strike) •
func_hostage_rescue (Counter-Strike) •
info_hostage_rescue (Counter-Strike) •
infodecal (Half-Life)Starting with an empty room, you will need to add the following:
- An
info_player_start
- where the CT spawn will be - An
info_player_deathmatch
- where the T spawn will be - A
func_buyzone
brush entity- You can make this team specific in the entity properties - but if you do, you'll need another one so the other team can buy stuff.
- Place the buyzone brush a few units off the floor, but not too far. It should be placed so the player can walk into it.
Next, add some hostages to be rescued. Place a few
hostage_entity
entities in your map. The number of hostage entities you put in the map is up to you, but most maps use 4 or 5.
Now we need somewhere to lead them so they will be rescued. You have two choices here:
func_hostage_rescue
- A brush-based hostage rescue zone with a custom size.info_hostage_rescue
- A point-based hostage rescue zone with a fixed size of about 128 units from the entity origin.
If you use both entities in the same map, only the
func_hostage_rescue
will be used by the game as a rescue zone, so it's best to only use one type in your map. If you put either entity close to a wall, be careful as it might be possible for the hostages to be rescued from the other side of the wall. It is recommended that you put your hostage rescue zone in an open area.
Finally, you will need some way to mark the rescue zone for the players to see. The hostage rescue point decal is
{hrpoint
in the cstrike/decals.wad, but you can create your own if you want to add a unique touch to your map.
Creating a defuse (de_) map
See also:
func_bomb_target (Counter-Strike) •
info_bomb_target (Counter-Strike) •
infodecal (Half-Life)Just like a
cs_ map, start by adding some player spawn points and buyzones.
Next, you will need at least one
func_bomb_target
entity - the size of the brush will define the area in which the player can place the bomb. Similar to the hostage rescue zone entities, you could use an
info_bomb_target
instead if you're okay using a fixed size bomb zone.
Again, you should place some decals so players know where the bomb target is.
{target
and
{target2
are good options for this, but you can use a custom decal or texture instead.
Creating an assassination (as_) map
See also:
info_vip_start (Counter-Strike) •
func_vip_safetyzone (Counter-Strike)Once again, start by adding some spawn points and buyzones to your map. For an assassination map, you must add one additional spawn point: a
info_vip_start
, so the VIP can spawn. It should probably be around the same area as the CT spawn points, as it's their job to protect the VIP.
You'll then need a
func_vip_safetyzone
to mark the escape zone for the hostage, this works just like the bomb zone and hostage rescue zone brush entities. Most maps don't use a particular decal to mark this zone, but use objects in the world instead - such as a vehicle, door, or elevator. Feel free to create some custom textures to suit your map, though.
Creating an escape (es_) map
See also:
func_escapezone (Counter-Strike)This map type isn't very popular, and for good reason - the latest versions of CS don't support it very well. The aim of this game mode is for the terrorists to reach an escape zone, so that zone should be close to the CT spawn so they can protect it. The escape zone is marked by a
func_escapezone
entity, which works the same as the other zone-type entities.
Triggering entities once per round & resetting entities on each round
If you're adding complex entity setups to you map, you will probably encounter difficulty with CS's behaviour surrounding resetting entities. Many entities such as doors and breakables will reset automatically each round, but other entities and complex setups will not. It's quite tricky to create an entity setup that will only work once in a round, but will reset cleanly so it can work again in the next round. Fortunately
MistaX88 has created a handy example map with work-arounds for this issue, click through to the example map below for more information.
Loading embedded content: Vault Item #6280