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.
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
in the map, then no-one else will be able to join the map. It is a good idea to place about 16 of each type of
entity in your map for a total of 32 spawns. It is up to you how many you want to use, but 32 is the max number the game can handle, and with the limited number of active servers at this stage in the life of Counter-Strike, you're ensuring that every server can safely have the map in their rotation. Even if a map is designed for less people, server operators tend to avoid maps with less spawns than their number of player slots because the map could be started with a small number but people could join later and end up stuck in spectator until the map ends or spots open up. Make sure they are not too 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. If you're not sure if all of your spawn points are safe you can load up the map with bots and test it out. If you have both CS 1.6 and CS: Condition Zero on steam then it's as easy as starting up the map in Condition Zero and using the bots in game. You don't even have to copy the map or assets over, CZ will automatically read it from the cstrike folder.
There is also an entity that is normally used with the Spawn points and that is a
. 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
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.
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.
- 35hp_mapname: A specific version of Knife arena but where all players are reduced to 35hp ensuring all right-click stabs are an instant kill.
- 1hp_mapname: Another specific version of Knife arena, this is like 35hp except everyone's health is reduced to 1hp.
- 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)
Starting with an empty room, you will need to add the following:
info_player_start - where the CT spawn will be
info_player_deathmatch - where the T spawn will be
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
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
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
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)
Just like a cs_
map, start by adding some player spawn points and buyzones.
Next, you will need at least one
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
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.
are good options for this, but you can use a custom decal or texture instead. It is also a good idea to avoid putting bomb targets in water, and if it's next to water, to test if there is any way to still plant it in the water. If the bomb is planted in water the bomb will not explode when the timer ends and it won't end the round.
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
, 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
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
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.