Ru/L4D Level Design/Ladders
Сначала вернитесь в Hammer, чтобы добавить в нашу карту лестницу.
Создайте tutorial02.vmf
В первую очередь нам нужно создать новую версию карты, что мы использовали в предыдущем разделе.
Откройте файл карты tutorial01.vmf
который вы создали ранее в Hammer (если он еще не открыт). Он расположен в папке mapsrc, по умолчанию:
C:\Program Files\Steam\steamapps\common\left 4 dead\sdk_content\mapsrc\
Итак мы сделаем новую рабочую версию и скомпилируем ее:
- Для этого проходим в меню File и выбираем Save As...
- Меняем имя на
tutorial02.vmf
.
Создание комнаты
Сначала, выберите потолок второй комнаты, созданной в прошлом уроке.
Передвинте браш на 128 юнитов выше текущего положения.
Выделите браши стены во второй комнате и продублируйте их таким образом, чтобы новый набор стен располагался точно над сделанными ранее.

Теперь, модифицированная вами комната должна выглядеть так:
Вы увидите темную дыру ведущую вне наших комнат и коридора. Карта скомпилируются неправильно и не запустится при наличии таких дыр или "щелей" выходящих за границы созданного уровня. Поправим это.
Веберите верхную часть стен со стороны дырки.
Увеличьте размер "заплатки" перемещая мышкой метку на углу.
Creating a ledge
Выберите нижнюю часть задней стены второй комнаты нажатием на нее в окне 3D-вида.
При помощи окна просмотра Сверху, расширьте стену в сторону комнаты так, чтобы ее ширина составляла 128 юнитов.
Снимите выделение с браша нажатием кнопки Esc.
Текстурирование брашей
Просто, чтобы показать, как сменить текстуры брашей, давайте покроем весь пол и потолок на нашей карте текстурой dev/dev_measuregeneric01b
.
Чтобы редактировать отдельные стороны брашей, нажмите на кнорпку File:Hammer toggletextureapplicationicon.jpg Texture application mode на панели Tool.
Вы увидите появившееся окно Face Edit Sheet.
Вы можете найти нужную вам текстуру нажатием на кнопку Browse на панели Texture, либо вы можете сделать захват уже использованной текстуры с брашей.
Чтобы захватить текстуру с фейса одного из брашей, просто нажмите ЛКМ на полу, где вы видите серую текстуру.
Вы заметите, что это заменит миниатюру текущей текстуры на панели Face Edit на выбранную вами measuregeneric
.
Чтобы применить текстуру на другой фейс, просто нажмите ПКМ на фейсе, у которого хотите заменить текстуру.
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 File:Hammer entitytoolicon.jpg 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.
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.
You should now have the ladder where you placed your prop_static.
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.
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.

Decrease your grid size to 2 units in order to fit the ladder better by pressing the [ key twice.
Click 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.
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 toggletextureapplicationicon.jpg Texture application mode button.
You will see the Face Edit Sheet dialog box appear again.
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
".

You should see the LADDER
texture now occupying the thumbnail in the Face Edit Sheet.
Now click the Apply Button and your selected face should change to the LADDER
texture.
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.
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.
Compile the level
Now compile the level by pressing the F9 key and then clicking on the OK Button.

Your ladder 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.
- L4D Level Design/Your First L4D Level:ru|:L4D Level Design/Your First L4D Level:ru]]