L4D Level Design/Ladders: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (otherlang2)
mNo edit summary
 
(14 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{otherlang2
{{LanguageBar}}{{L4D level intro menu}}
|pt-br=L4D_Level_Design/Ladders:pt-br
|ru=L4D Level Design/Ladders:ru
}}
 
{{L4D level intro menu}}
 
Next we'll return to Hammer to add a ladder to our map.
Next we'll return to Hammer to add a ladder to our map.


Line 32: Line 26:
You modified room should look like this:
You modified room should look like this:


[[Image:l4d_hammer_ladder_01.jpg|thumb|left|500px|caption|Duplicating walls to make a taller room.]]
[[File:l4d_hammer_ladder_01.jpg|thumb|left|500px|caption|Duplicating walls to make a taller room.]]


{{clr}}
{{clr}}
Line 38: Line 32:
You will now see a hole to the blackness outside our contained rooms and hallway. Maps will not compile correctly or run correctly if there is a hole or "[[leak]]" to the outside part of the level. Let's fix that.
You will now see a hole to the blackness outside our contained rooms and hallway. Maps will not compile correctly or run correctly if there is a hole or "[[leak]]" to the outside part of the level. Let's fix that.


[[Image:l4d_hammer_ladder_02.jpg|thumb|left|500px|caption|Make sure to seal the level properly.]]
[[File:l4d_hammer_ladder_02.jpg|thumb|left|500px|caption|Make sure to seal the level properly.]]


Select the upper part of the wall to the side of the hole.
Select the upper part of the wall to the side of the hole.
Line 45: Line 39:


== Creating a ledge ==
== Creating a ledge ==
[[Image:l4d_hammer_ladder_03.jpg|thumb|left|500px|caption|Making one of the bottom walls a ledge.]]
[[File:l4d_hammer_ladder_03.jpg|thumb|left|500px|caption|Making one of the bottom walls a ledge.]]


Now select the lower portion of the back wall in the second room by clicking on it in the 3D view.
Now select the lower portion of the back wall in the second room by clicking on it in the 3D view.
Line 59: Line 53:
Just to illustrate how to change the texture of a brush face, let's make all of our floors and ceilings the <code>dev/dev_measuregeneric01b</code> texture.
Just to illustrate how to change the texture of a brush face, let's make all of our floors and ceilings the <code>dev/dev_measuregeneric01b</code> texture.


To edit individual faces of brushes, click on the [[Image:Hammer_ToggleTextureApplication.png]] '''Texture application mode''' button on the '''Tool''' bar.
To edit individual faces of brushes, click on the [[File:Hammer_ToggleTextureApplication.png]] '''Texture application mode''' button on the '''Tool''' bar.


[[Image:l4d_hammer_face_edit_00.jpg|thumb|right|300px|caption|The Face Edit Sheet dialog box.]]
[[File:l4d_hammer_face_edit_00.jpg|thumb|right|300px|caption|The Face Edit Sheet dialog box.]]


You will see the '''Face Edit Sheet''' dialog box appear.
You will see the '''Face Edit Sheet''' dialog box appear.
Line 67: Line 61:
{{clr}}
{{clr}}


[[Image:l4d_hammer_texture_face_01.jpg|thumb|right|500px|caption|Lifting a texture from an existing face.]]
[[File:l4d_hammer_texture_face_01.jpg|thumb|right|500px|caption|Lifting a texture from an existing face.]]


You can browse for the texture just like when you used the '''Texture''' bar's '''Browse''' to find a texture, or you can ''lift'' it from an existing face.
You can browse for the texture just like when you used the '''Texture''' bar's '''Browse''' to find a texture, or you can ''lift'' it from an existing face.
Line 77: Line 71:
{{clr}}
{{clr}}


[[Image:l4d_hammer_texture_face_02.jpg|thumb|right|500px|caption|Applying a texture to a face.]]
[[File:l4d_hammer_texture_face_02.jpg|thumb|right|500px|caption|Applying a texture to a face.]]


To apply it to another face, simply '''right-click''' on the face you want to receive the texture.
To apply it to another face, simply '''right-click''' on the face you want to receive the texture.
Line 87: Line 81:
== Placing a Ladder Model ==
== Placing a Ladder Model ==


Switch to the [[Image:Hammer_entity.png]] '''Entity Tool''' and select "<code>prop_static</code>" from the '''Objects''' drop-down menu on the '''Entity''' bar if it isn't already set as this.
Switch to the [[File:Hammer_entity.png]] '''Entity Tool''' and select "<code>[[prop_static]]</code>" from the '''Objects''' drop-down menu on the '''Entity''' bar if it isn't already set as this.


Place a prop_static by clicking on the back wall that you just widened.
Place a prop_static by clicking on the back wall that you just widened.


[[Image:l4d_hammer_ladder_04.jpg|thumb|right|500px|caption|Selecting a ladder from the Model Browser.]]
[[File:l4d_hammer_ladder_04.jpg|thumb|right|500px|caption|Selecting a ladder from the Model Browser.]]


Deselect the prop_static by pressing the {{key|Esc}} key then '''double-click''' on it to bring up its properties.
Deselect the prop_static by pressing the {{key|Esc}} key then '''double-click''' on it to bring up its properties.
Line 107: Line 101:
{{clr}}
{{clr}}


[[Image:l4d_hammer_ladder_05.jpg|thumb|right|500px|caption|Placing the ladder.]]
[[File:l4d_hammer_ladder_05.jpg|thumb|right|500px|caption|Placing the ladder.]]


You should now have the ladder where you placed your prop_static.
You should now have the ladder where you placed your prop_static.
Line 113: Line 107:
{{clr}}
{{clr}}


[[Image:l4d_hammer_ladder_06.jpg|thumb|right|500px|caption|Moving the ladder into position.]]
[[File:l4d_hammer_ladder_06.jpg|thumb|right|500px|caption|Moving the ladder into position.]]


Switch back to the '''Selection tool''' and rotate and move your ladder so that it is in the middle of this back wall and the bottom touches the floor.
Switch back to the '''Selection tool''' and rotate and move your ladder so that it is in the middle of this back wall and the bottom touches the floor.
Line 123: Line 117:
Now that you have the model that shows where your ladder is, you will need to place the actual entity that allows players and and other characters to climb it.
Now that you have the model that shows where your ladder is, you will need to place the actual entity that allows players and and other characters to climb it.


[[Image:l4d_hammer_nodraw.jpg|thumb|right|200px|caption|Making the tools/toolsnodraw texture the current texture.]]
[[File:l4d_hammer_nodraw.jpg|thumb|right|200px|caption|Making the tools/toolsnodraw texture the current texture.]]


Click on the '''Browse''' button on the '''Texture''' bar.
Click on the '''Browse''' button on the '''Texture''' bar.
Line 137: Line 131:
Decrease your grid size to 2 units in order to fit the ladder better by pressing the {{key|[}} key twice.
Decrease your grid size to 2 units in order to fit the ladder better by pressing the {{key|[}} key twice.


[[Image:l4d_hammer_ladder_07.jpg|thumb|right|500px|caption|Drawing a brush over the front of the ladder model.]]
[[File:l4d_hammer_ladder_07.jpg|thumb|right|500px|caption|Drawing a brush over the front of the ladder model.]]


Click [[Image:Hammer block.png]] '''Block Tool''' and then create a brush in the '''Top''' viewport in front of the ladder.
Click [[File:Hammer block.png]] '''Block Tool''' and then create a brush in the '''Top''' viewport in front of the ladder.


The brush should be approximately 32 units wide, 128 units tall, and 2 units thick. If necessary, resize the brush by dragging the corner handles and drag into place in front of the ladder model as shown in the image.
The brush should be approximately 32 units wide, 128 units tall, and 2 units thick. If necessary, resize the brush by dragging the corner handles and drag into place in front of the ladder model as shown in the image.
Line 145: Line 139:
{{clr}}
{{clr}}


[[Image:l4d_hammer_face_edit_01.jpg|thumb|right|300px|caption|The Face Edit Sheet dialog box with the nodraw texture on it.]]
[[File:l4d_hammer_face_edit_01.jpg|thumb|right|300px|caption|The Face Edit Sheet dialog box with the nodraw texture on it.]]


Now, you will need to make one face of the brush (the face that points out from the ladder) a ladder tool texture. To edit individual faces of brushes, click the [[Image:Hammer_ToggleTextureApplication.png]] '''Texture application mode''' button.
Now, you will need to make one face of the brush (the face that points out from the ladder) a ladder tool texture. To edit individual faces of brushes, click the [[File:Hammer_ToggleTextureApplication.png]] '''Texture application mode''' button.


You will see the '''Face Edit Sheet''' dialog box appear again.
You will see the '''Face Edit Sheet''' dialog box appear again.
Line 153: Line 147:
{{clr}}
{{clr}}


[[Image:l4d_hammer_ladder_08.jpg|thumb|right|200px|caption|The tools/toolsinvisibleladder texture.]]
[[File:l4d_hammer_ladder_08.jpg|thumb|right|200px|caption|The tools/toolsinvisibleladder texture.]]


With this dialog box still appearing, select the face pointing away from the ladder in the '''Camera''' viewport by clicking it with the left mouse button.
With this dialog box still appearing, select the face pointing away from the ladder in the '''Camera''' viewport by clicking it with the left mouse button.
Line 167: Line 161:
{{clr}}
{{clr}}


[[Image:l4d_hammer_ladder_09.jpg|thumb|right|500px|caption|The ladder texture in the '''Face Edit Sheet'''.]]
[[File:l4d_hammer_ladder_09.jpg|thumb|right|500px|caption|The ladder texture in the '''Face Edit Sheet'''.]]


You should see the <code>LADDER</code> texture now occupying the thumbnail in the '''Face Edit Sheet'''.
You should see the <code>LADDER</code> texture now occupying the thumbnail in the '''Face Edit Sheet'''.
Line 173: Line 167:
{{clr}}
{{clr}}


[[Image:l4d_hammer_ladder_10.jpg|thumb|right|500px|caption|Applying the current texture to the selected face.]]
[[File:l4d_hammer_ladder_10.jpg|thumb|right|500px|caption|Applying the current texture to the selected face.]]


Now click the '''Apply''' Button and your selected face should change to the <code>LADDER</code> texture.
Now click the '''Apply''' Button and your selected face should change to the <code>LADDER</code> texture.
Line 179: Line 173:
{{clr}}
{{clr}}


[[Image:l4d_hammer_ladder_11.jpg|thumb|right|300px|caption|Selecting '''Tie to Entity''' from the '''Tools''' menu.]]
[[File:l4d_hammer_ladder_11.jpg|thumb|right|300px|caption|Selecting '''Tie to Entity''' from the '''Tools''' menu.]]


Exit the Texture application mode by closing the '''Face Edit Sheet''' dialog box.
Exit the Texture application mode by closing the '''Face Edit Sheet''' dialog box.
Line 189: Line 183:
{{clr}}
{{clr}}


[[Image:l4d_hammer_func_ladder_01.jpg|thumb|right|500px|caption|Changing the func_detail to a func_ladder.]]
[[File:l4d_hammer_func_ladder_01.jpg|thumb|right|500px|caption|Changing the func_detail to a func_ladder.]]


This will make the brush a ''[[brush entity]]''. This changes the solid block of geometry we had before into a special brush that can have properties that can be changed to affect the game.
This will make the brush a ''[[brush entity]]''. This changes the solid block of geometry we had before into a special brush that can have properties that can be changed to affect the game.


The default brush entity is a <code>func_detail</code> which we will talk about a little later.
The default brush entity is a <code>[[func_detail]]</code> which we will talk about a little later.


We want to make this brush entity a <code>func_ladder</code>. Pull down the drop-down menu choices and select "<code>func_ladder</code>".
We want to make this brush entity a <code>[[func_ladder]]</code>. Pull down the drop-down menu choices and select "<code>func_ladder</code>".


Then click on the '''Apply''' button to confirm the change and close the '''Object Properties''' dialog box.
Then click on the '''Apply''' button to confirm the change and close the '''Object Properties''' dialog box.
{{note | Ladders that are accessible to both survivors and infected teams do not need to be tied to <code>func_ladder</code> entities. Just note that when generating a navmesh, it will not automatically build navigation for non-<code>func_ladder</code> ladders. You can manually build ladder navigation by using the connsole command <code>nav_build_ladder</code>.}}


{{clr}}
{{clr}}
Line 203: Line 198:
== Compile the level ==
== Compile the level ==


[[Image:l4d_hammer_ladder_12.jpg|thumb|right|400px|caption|The ladder in the game.]]
[[File:l4d_hammer_ladder_12.jpg|thumb|right|400px|caption|The ladder in game.]]


Now compile the level by pressing the {{key|F9}} key and then clicking on the '''OK''' Button.
Now compile the level by pressing the {{key|F9}} key and then clicking the '''OK''' Button.


{{note|When the game launches, dismiss the "'''Map is unplayable!'''" dialog by pressing the '''Continue''' button. This is expected because we haven't created a navigation file for our level yet.}}
{{note|When the game launches, dismiss the "'''Map is unplayable!'''" dialog by pressing the '''Continue''' button. This is expected because we haven't created a navigation file for our level yet.}}


Your ladder look something like this in-game.
Your ladder should look something like this in-game.


You should be able to move up to your ladder and move up it to climb up onto the ledge. If you can't, it's possible it was not created correctly. Try going back to Hammer, deleting your ladder and creating it again.
You should be able to move up to your ladder and move up it to climb up onto the ledge. If you can't, it's possible it was not created correctly. Try going back to Hammer, deleting your ladder, and following the steps to for creating it again.


{{clr}}
{{clr}}
== See also ==
* [[L4D_Level_Design/Versus_Maps#Making Infected Ladders Visible|Infected-only Ladders]]


{{NavBar|L4D Level Design/Your First L4D Level|L4D Level Design Basics Tutorial|L4D Level Design/Visibility}}
{{NavBar|L4D Level Design/Your First L4D Level|L4D Level Design Basics Tutorial|L4D Level Design/Visibility}}
[[Category:Left 4 Dead]]
[[Category:Left 4 Dead]]
[[Category:Left 4 Dead 2]]
[[Category:Left 4 Dead 2]]
[[Category:Level Design]]
[[Category:Level Design]]

Latest revision as of 15:02, 19 March 2025

English (en)Português do Brasil (pt-br)Русский (ru)中文 (zh)Translate (Translate)

Next we'll return to Hammer to add a ladder to our map.

Create tutorial02.vmf

First thing we'll do is create a new version of the map we used in the previous section.

In Hammer, open the map file tutorial01.vmf that you created earlier (if it's not already open). This should be located in the mapsrc folder, by default:

C:\Program Files\Steam\steamapps\common\left 4 dead\sdk_content\mapsrc\

Now we'll make a new version to work with and compile it:

  • Go to File menu and choose Save As...
  • Change the name to tutorial02.vmf.

Building out the room

First, select the ceiling of the second room you created in the first room tutorial.

Move the brush 128 units higher than it is.

Select the wall brushes in the second room and duplicate them so that the new set of walls rests on top of the old ones.

Note.pngNote:By duplicating the walls and moving them on top of the old ones instead of making the original walls higher, you have more freedom with how you want to texture the walls.

You modified room should look like this:

Duplicating walls to make a taller room.

You will now see a hole to the blackness outside our contained rooms and hallway. Maps will not compile correctly or run correctly if there is a hole or "leak" to the outside part of the level. Let's fix that.

Make sure to seal the level properly.

Select the upper part of the wall to the side of the hole.

Expand its size to cover the opening by dragging the corner handle.

Creating a ledge

Making one of the bottom walls a ledge.

Now select the lower portion of the back wall in the second room by clicking on it in the 3D view.

Using theTop viewport, widen the wall into the room so that it is 128 units wide, forming a ledge.

Deselect the brush by pressing the Esc key.

Texturing a brush face

Just to illustrate how to change the texture of a brush face, let's make all of our floors and ceilings the dev/dev_measuregeneric01b texture.

To edit individual faces of brushes, click on the Hammer ToggleTextureApplication.png Texture application mode button on the Tool bar.

The Face Edit Sheet dialog box.

You will see the Face Edit Sheet dialog box appear.

Lifting a texture from an existing face.

You can browse for the texture just like when you used the Texture bar's Browse to find a texture, or you can lift it from an existing face.

To lift it from an existing face, simply left-click on the floor where you see the gray developer texture.

You'll notice that this will replace the thumbnail with the measuregeneric texture on the Face Edit panel.

Applying a texture to a face.

To apply it to another face, simply right-click on the face you want to receive the texture.

Right-click on the top of the ledge you created to give it the same gray texture as the floor.

Placing a Ladder Model

Switch to the Hammer entity.png Entity Tool and select "prop_static" from the Objects drop-down menu on the Entity bar if it isn't already set as this.

Place a prop_static by clicking on the back wall that you just widened.

Selecting a ladder from the Model Browser.

Deselect the prop_static by pressing the Esc key then double-click on it to bring up its properties.

Click on the World Model row.

Click on the Browse on the right of the Object Properties dialog box.

Type "ladder" into the Filter field.

Select "props_c17/metalladder002.mdl and then click OK.

Click Apply on the Object Properties dialog.

Placing the ladder.

You should now have the ladder where you placed your prop_static.

Moving the ladder into position.

Switch back to the Selection tool and rotate and move your ladder so that it is in the middle of this back wall and the bottom touches the floor.

Creating a func_ladder

Now that you have the model that shows where your ladder is, you will need to place the actual entity that allows players and and other characters to climb it.

Making the tools/toolsnodraw texture the current texture.

Click on the Browse button on the Texture bar.

Type "nodraw" into the filter.

Double-click on the texture "tools/toolsnodraw" to select it and close the browser.

Tip.pngTip:Nodraw is a special "tools" texture that has special properties in the game. In this case, it creates a solid object that does not render ("draw") when the level is played in-game. Essentially an invisible, but solid object.

Decrease your grid size to 2 units in order to fit the ladder better by pressing the [ key twice.

Drawing a brush over the front of the ladder model.

Click Hammer block.png Block Tool and then create a brush in the Top viewport in front of the ladder.

The brush should be approximately 32 units wide, 128 units tall, and 2 units thick. If necessary, resize the brush by dragging the corner handles and drag into place in front of the ladder model as shown in the image.

The Face Edit Sheet dialog box with the nodraw texture on it.

Now, you will need to make one face of the brush (the face that points out from the ladder) a ladder tool texture. To edit individual faces of brushes, click the Hammer ToggleTextureApplication.png Texture application mode button.

You will see the Face Edit Sheet dialog box appear again.

The tools/toolsinvisibleladder texture.

With this dialog box still appearing, select the face pointing away from the ladder in the Camera viewport by clicking it with the left mouse button.

Click on the Browse button in the Face Edit Sheet dialog box and you will see the Texture browser window appear again.

Type "ladder" into the Filter field.

Double-click the texture "tools/toolsinvisibleladder".

Tip.pngTip:This is another of those special "tools" textures. This one marks the brush face as one that can be climbed in-game.
The ladder texture in the Face Edit Sheet.

You should see the LADDER texture now occupying the thumbnail in the Face Edit Sheet.

Applying the current texture to the selected face.

Now click the Apply Button and your selected face should change to the LADDER texture.

Selecting Tie to Entity from the Tools menu.

Exit the Texture application mode by closing the Face Edit Sheet dialog box.

Select the brush with the LADDER texture on the one face.

Go to the Tools menu and pick Tie to Entity.

Changing the func_detail to a func_ladder.

This will make the brush a brush entity. This changes the solid block of geometry we had before into a special brush that can have properties that can be changed to affect the game.

The default brush entity is a func_detail which we will talk about a little later.

We want to make this brush entity a func_ladder. Pull down the drop-down menu choices and select "func_ladder".

Then click on the Apply button to confirm the change and close the Object Properties dialog box.

Note.pngNote: Ladders that are accessible to both survivors and infected teams do not need to be tied to func_ladder entities. Just note that when generating a navmesh, it will not automatically build navigation for non-func_ladder ladders. You can manually build ladder navigation by using the connsole command nav_build_ladder.

Compile the level

The ladder in game.

Now compile the level by pressing the F9 key and then clicking the OK Button.

Note.pngNote:When the game launches, dismiss the "Map is unplayable!" dialog by pressing the Continue button. This is expected because we haven't created a navigation file for our level yet.

Your ladder should look something like this in-game.

You should be able to move up to your ladder and move up it to climb up onto the ledge. If you can't, it's possible it was not created correctly. Try going back to Hammer, deleting your ladder, and following the steps to for creating it again.

See also