L4D Level Design/Your First L4D Level
- Getting Started
- Your First L4D Level
- Ladders
- Visibility
- Nav Meshes
- Checkpoints
- Checkpoint Rooms
- Outdoor Levels
- Level Organization
- Level Standards
- Clip Brushes
- Elevators
- Panic Events
- Breakable Walls
- Finale Events Part 1
- Finale Events Part 2
- Finale Events Part 3
- Additional Finale Components
- Nav Flow
- Advanced Nav Editing
- Versus Maps
Contents[hide] |
[edit] Creating a Room
[edit] Creating a Floor Brush
Click the 5th icon on the Tool Bar, which is called the Block Creation Tool.
Now, left-click and drag in the Top viewport in a Right and Down movement.
You should see a dotted outline of a rectangle or square as you drag. Create a square 512x512 units and let go of the left-mouse button. Press Enter on your keyboard to create this brush that you've just drawn.

To go back to Selection Mode (the default mode), click on the 1st icon on the Tool Bar, the arrow, or press the Esc Key.
In selection mode, with the brush selected, you can change the size of the brush by left-clicking on any of the boxes that appear on the borders of the brush and dragging them out or in.
Let's decrease the thickness of the brush (which we'll be using as a floor) from 64 units to 16. To do this, we need to change the size of the grid. You can decrease the grid size with the [ key and increase it with the ] key. To bring the grid size down to 16 units, press the [ key twice.
In the Side viewport, drag the top border of the brush down so that it's 16 units thick.
You can move brushes around once they're created. Left-click and drag inside a selected brush to move it or you can move it with the arrow keys.
First of all, to use the arrow keys to move objects, you will need to change an option in your settings. Go to Tools > Options to bring up the Configure Hammer Dialog Box.
There are other settings here as well, but for using the arrow keys, you will just need to check the box marked "Arrow keys nudge selected object/vertex".
Let's move the floor brush down 16 units by placing the mouse cursor over the Side viewport and pressing the down arrow once.

[edit] Navigating in the Editor
2D Viewports:
- Use Mouse Wheel to zoom in and out
- Hold down the Space Bar and left-click drag to pan around the viewports
Camera Viewport:
- Hold down the Space Bar and left-click drag to rotate the camera.
- Hold down the Space Bar and right-click drag to move up/down and left/right.
- Hold down the Space Bar and both right and left-click drag to move forward and backward.
- You can also use W, S, A, and D to move forward, backward, strafe left and strafe right respectively.
- The z key toggles on and off Mouse Look Mode. Move your mouse cursor over the Camera Viewport and press the z key. You can now move your mouse around as if mouse look was on in the game.
[edit] Texturing
To see textures in the Camera viewport, right-click on the "camera" text in the Camera viewport and select 3D Textured.
If you move up in the Camera viewport and look down at the floor that you've just created, you'll notice there's a default texture on it. You'll probably want to change it. To change the current texture, click on the Browse button on the Texture Box.
This will bring up the Texture Browser.
In the Filter Field, you can filter the textures based on name. For this tutorial, type in the word "dev" into the field. This will bring up developer textures that will make it easier to create something quickly.
Now, find the texture called dev/dev_measuregeneric01b and double-click on it.
This should bring back the 4 viewports of the editor and place the generic dev texture as the current one.
Select the floor brush, if it isn't already selected, by clicking on it in the Camera viewport. When a brush is selected you can then click on the 7th icon down on the Tool Bar to apply the current texture to the selection.
[edit] Creating the Walls and Ceiling
You can create the walls and ceiling of the room the same way you created the floor.
Duplicating:
You can also select an existing brush and duplicate it to create them.

To duplicate, select the floor brush that you've created. Move your cursor over the Side viewport and then hold the Shift Key down and press the Up Arrow Key. This will create a brush exactly like the floor on top of the existing floor.
You can now change the size and dimensions of this new brush to create a wall. Let's make the wall 128 units tall and 16 units thick. You can then duplicate the wall 3 more times to outline the floor.
Duplicate the floor brush 1 more time and raise it to become the ceiling.

[edit] Multiple Selection
You'll notice that in the Camera viewport, if you navigate inside the room, it's hard to tell what's going on because all of the walls, floor and ceiling are the same texture.
You can select all of the walls by holding down the Ctrl Key and clicking on them in the Camera viewport.
Then click on the Browse Button in the Texture Box again and, this time, select the orange texture next to the current one. It will be labeled dev/dev_measuregeneric01.
Use the 7th icon on the Tool Bar to apply it to the walls.
[edit] Saving the File
To save a level, you can use Ctrl+s or File > Save from the Menu Bar.
You will need to give the file a name and choose the directory to place it in. For this tutorial, you can just name the file "tutorial01".
[edit] Placing Entities
Click on the 4th icon on the Tool Bar, the Entity Creation Tool.
Once the Entity Creation Tool is enabled, the Entity Box Drop Down Menus become active. Keep the Categories entry as "Entities". Change the Objects entry to "info_survivor_position" by clicking on the drop down arrow in the Drop Down Menu.
Now, navigate in the Camera viewport to the middle of the inside of the room and left-click on the floor.
This will place an info_survivor_position in the middle of the room.
The model for an info_survivor_position is Francis. He's the tallest character in Left 4 Dead, so this is a good entity to drop down to check your scale.
[edit] Placing a Light
Select the Entity Creation Tool again and this time select "light" from the Drop Down Menu under Objects. This time, place the light on the ceiling (above Francis' head). Go into Selection Mode by clicking on the Arrow Icon in the Tool Bar or by pressing the Esc Key.
Bring up the light's properties by double-clicking it in the Camera viewport or by selecting it (left-clicking on it) and then pressing the Alt-Enter Keys at the same time.
From the Properties Dialog Box, you can change various properties of the entity. For example, you can change the Brightness of this light. Click on the Brightness Row under Keyvalues and you will see a set of numbers on the drop down menu on the right side. The default setting for the brightness of a light is 255 255 255 200. The first 3 numbers represent the RGB values and the last number represents the intensity of the light.
You can click on the Pick Color Button to select a color rather than input values for it.
Simply click on the color you want the light to be and click OK.
This will bring you back to the Object Properties Dialog Box for the light. You should see any changes you made to the brightness on the Brightness Row and the drop down field on the right side if the Brightness Row is selected.
Click the Apply button to set your changes to the entity.
Close the dialog box by clicking on the X at the upper right side of the window.
[edit] Placing a Prop
Entities also consist of props like furniture, decoration, and complex parts of architecture. To place a prop, click on the Entity Creation Tool again (the 4th icon down on the Tool Bar). Go to the Entity Box and change the Objects field to prop_static.
There are a variety of different kinds of props. Prop_static entities are props that are static – they don't move, animate, turn on or turn off. There are also prop_dynamic entities that can move, animate, be enabled and disabled. There are also prop_physics entities which the player can interact with and behave physically as they would in the real world.
Point to the floor in front of the model of Francis and left-click to place a prop_static. You will see a red cube that represents the prop_static before a model is attached to it. Go into Selection Mode by pressing the 1st icon on the Tool Bar or pressing the Esc Key. Double click on the red cube to open the properties.
Click on the World Model Row and then click on the Browse Button on the right hand side to browse the available models.

In the Filter field at the bottom of the dialog box, type in "table". This will show all the models that have the word table in their name. Scroll down to the one named "props_furniture\it_mkt_table2.mdl" and then click OK.
This will bring you back to the Object Properties Dialog Box for the prop_static. You should see the name of the model now in the World Model Row.
Click the Apply button to set your changes to the entity.
Close the dialog box.
You will see the table that you just placed in the room in any of the viewports in the editor.
[edit] Moving Entities
To move the table, you can move your mouse over any of the viewports and use the arrow keys on your keyboard to move them around. You can also click and drag inside the bounding box of the selected entity to move it around with your mouse.
Let's move the table to a corner of our room and set it so that it sits on the floor.
[edit] Rotating Entities
To rotate an entity, simply click inside the selected entity's bounding box to switch it to rotate mode. You can then left-click and drag the corners to rotate.
Let's try placing a pump shotgun on the table in our room and rotating it so that it looks like it's in a natural position.
Click on the Entity Creation Tool in the Tool Bar.
In the Entity Box, select "weapon_pumpshotgun_spawn" from the drop down menu under Objects.
Click on the floor underneath the table prop.
Zoom into the Front viewport and click once inside the bounding box of the pump shotgun model to make its 4 corners highlight with circles around each one.
Left-click and drag in a counter-clockwise motion to rotate the pump shotgun so that it's lying on its side.
Zoom into the Side viewport and press the "[" key 4 times to decrease the grid spacing. Click and drag inside the bounding box of the shotgun to raise it to sit on top of the table.
In the Top Viewport, click inside the bounding box of the shotgun until it's in the rotate mode again. Left-click and drag one of the corners counter-clockwise until the shotgun sits almost parallel to the table.
Now you will have a shotgun that you can pick up from the table.
[edit] Adding to Your Room
Using the duplication, scaling and moving of the brushes you currently have in your room, you can now build a hallway and another room identical to the first.
Make sure to create openings into both rooms from the hallway.
You can also duplicate the light in the first room and move it to the middle of the second room.
Now, save the level as "tutorial01.vmf"

[edit] Running Your Level in the Game
For this first test map that you've created, copy the included \pages\downloads\tutorial01.nav
file "tutorial01.nav" into your left4dead\maps directory.
Once you have the level in a state where it can be tested, you can simply press F9 in the editor which will bring up the Run Map Dialog Box.
There are options that you can configure for different tests, but for now, just press OK.
Your level in the game should load up after compiling. It may take a minute or two.
[edit] The Nav Mesh

To see the nav mesh in the game, you will first need to enable the developer console in the game. Press the Esc Key in the game and click on Options. In the Options Window, click on the Allow Developer Console and select "Enabled".
Click on the OK Button and then click on the OK Button on the Options Window. Click on Resume Game.
To pull down the developer console, press the ` key.
Then, type nav_edit 1 in the console and hit enter.
You will see an area drawn on the ground where you are pointing as well as the areas that it is connected to.
More information about the nav mesh can be seen by typing z_debug 1 in the console and pressing the Enter Key.
[edit] More Useful Console Commands
- sv_cheats 1
- Turns on cheats
- director_stop
- Stops the director (no spawning for infected or specials
- director_start
- Starts the director (spawning resumes)
- nb_delete_all
- Deletes all existing npc's
- map <name of map>
- Loads a map or reloads the level you're in
- changelevel <name of map>
- Loads a map while continuing the session
- god 1
- Turns on God Mode for all Survivors
- noclip
- Allows you to fly through the world
- z_spawn
- Spawn a common infected where the cursor is
- z_spawn smoker
- Spawn a smoker
- z_spawn hunter
- Spawn a hunter
- z_spawn boomer
- Spawn a boomer
- z_spawn tank
- Spawn a tank
- z_spawn witch
- Spawn a witch
- nb_blind 1
- Make the infected blind to the player

- sb_stop 1
- Stop the survivor bot AI
- director_force_panic_event
- Start a panic event