Zones are used to divide your map into "areas" or "sections". Each section has one or more zombie spawn locations which are activated when players are standing within the zone, and deactivated when no players are present. At least one zone is required in order for zombies to spawn on a map which runs the latest Mod Tools scripts (v1.4).
Adjacent zones are exactly what the name implies. They are zones which are directly adjacent to (or "neighboring", "bordering") another zone. The game uses adjacent zones to activate nearby zones to the players to give the illusion that zombies are "coming from all directions". It makes it harder for the players to escape an oncoming wave of zombies.
To create a zone volume in Radiant, right-click the 2d view and from the Info menu, click Volume. This will create a brush with the "Volume Texture" on it. You must create volumes this way. You cannot just draw a normal brush and then apply the Volume tool-texture to it.
Stretch the brush to cover a section of your map. You want each zone to represent an area which has been sectioned off by buy-able barriers/debris.
Make sure you cover ALL playable area with zones volumes. If a player steps outside of a zone at any time, the game will freeze for a few seconds and zombies will not be able to find the player.
In order to accurately cover an area with a zone volume, you may need to use multiple brushes (see Fig. 1). This is OK as long as you give the additional zone pieces the same KVPs.
NOTE: KVP is an abbreviation for "Key-Value Pair". When entering a KVP in the Radiant Entity Window, ensure that you have the entity selected first. If you do not have an entity selected, Radiant will automatically add the KVP to the "worldspawn" entity. This is BAD and will likely cause your map to crash while loading! In these pages, KVP's are referred to in this format: Key | Value. Note they are separated by a pipe ( | ) character. This character should be ignored when entering the Key-Value Pair.
To properly add a KVP to an entity:
Make sure to append "_spawners" to the zone name when entering the target value - this will tell the zone which zombie spawners it will activate.
Each zone's purpose is to activate/deactive the zombie spawners it is linked to. In order for this to work properly you must correctly link your zombie & dog spawners to your zones.
For more info on how to create a zombie or dog spawner, see
Select the spawners which you want to link to a zone. Give them the following KVP:
Select the zone volume(s) and give them the following KVP's:
Remember that all of your riser and dog structs need to have the proper targetname to work properly with zones. See Creating Zombie and Dog Spawners for more info.
NOTE: "mapname.gsc" refers to your map's main gsc file, which is named the same name as your map. For example, a map called "nazi_zombie_example" would have a mapname.gsc named "nazi_zombie_example.gsc". This file is commonly used to call custom scripts for a map. Lines which precache items such as models need to be called BEFORE the gamestate starts and should not be threaded. Lines which do not precache any items should be called AFTER the gamestate starts and should be threaded. The gamestate is started by this line in mapname.gsc: To add lines to your mapname.gsc:
NOTE: "mapname.gsc" refers to your map's main gsc file, which is named the same name as your map.
For example, a map called "nazi_zombie_example" would have a mapname.gsc named "nazi_zombie_example.gsc". This file is commonly used to call custom scripts for a map.
Lines which precache items such as models need to be called BEFORE the gamestate starts and should not be threaded. Lines which do not precache any items should be called AFTER the gamestate starts and should be threaded.
The gamestate is started by this line in mapname.gsc:
To add lines to your mapname.gsc:
You must tell the game the name of the zone which players spawn inside at the start of the game. Since this zone is not activated by debris, it is declared differently than normal zones.
Find this line in your mapname.gsc
Change "initial_zone" to match the name of your start zone. Typically people use "start_zone" as their name, but if you want to save a step you could just use "initial_zone".
Find this block of code in your mapname.gsc:
Here you should see that Treyarch has already been kind enough to provide a brief description of how to set up your zones. I will not go to the trouble of repeating what is already written there, instead I will expand upon it for clarity.
Below the "Outside East Door" example is where you will be adding your own adjacent zone definitions. To begin, copy this code below the example add_adjacent_zone line (which has been commented out):
For every area you created in Radiant (ex; "zone1", "zone2", etc), you will need to paste a copy of the sample line at least once. If there are multiple zones adjacent to your zone then you will have multiple add_adjacent_zone() calls for the same zone_name.
The best way is to learn by example. Consider the following snippet from UGX Comosea's mapname.gsc:
As you can see, one zone can have multiple adjacent ones.
Zones must be activated by the script_flag KVP on a barrier, blocker, debris, or door. Ensure the script_flag matches what you specified for the zone in your mapname.gsc
You probably forgot to set up your start_zone in your mapname.gsc. See Declaring the start zone.
Add zone_debugger.iwd to your C:\Users\<USERNAME>\AppData\Local\Activision\CoDWaW\mods\mapname folder and run the map. Pause the game and check the console output after you spawn.
Scroll all the way to the bottom of the console window and look for any yellow] lines or red lines ]. You need to resolve all of these yellow/red issues to solve this script_runtime error.
If you don't see any yellow ['s or red [ , then proceed by buying your way to the zone which causes the error/freeze. Now check the console again for any yellow 's or red . Follow the directions that the lines give you.
Please remember to REMOVE the zone_debugger IWD from your map folder before releasing your map.