Zh/L4D Level Design/Ladders: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
(Created page with "{{otherlang2 |en=L4D Level Design/Ladders |pt-br=L4D_Level_Design/Ladders:pt-br |ru=L4D Level Design/Ladders:ru }} {{L4D level intro menu:zh-cn}}__TOC__ 接下来我们将...")
 
No edit summary
Line 6: Line 6:


{{L4D level intro menu:zh-cn}}__TOC__
{{L4D level intro menu:zh-cn}}__TOC__
译者:joyo_a(百度ID)


接下来我们将返回Hammer来添加一个梯子到我们的地图。
接下来我们将返回Hammer来添加一个梯子到我们的地图。
Line 45: Line 47:
通过拖动拐角手柄来扩大其大小以覆盖开口。{{clr}}
通过拖动拐角手柄来扩大其大小以覆盖开口。{{clr}}


== Creating a ledge ==
== 创建一个窗台 ==
[[Image:l4d_hammer_ladder_03.jpg|thumb|left|500px|caption|Making one of the bottom walls a ledge.]]
[[Image:l4d_hammer_ladder_03.jpg|thumb|left|500px|caption|使其中一个底壁为一个壁架。]]


Now select the lower portion of the back wall in the second room by clicking on it in the 3D view.
现在在3D视图中单击第二个房间中后墙的下部。


Using the'''Top''' viewport, widen the wall into the room so that it is 128 units wide, forming a ledge.
使用'''顶部'''视图,将墙扩大到房间,使其宽128个单位,形成一个窗台。


Deselect the brush by pressing the {{key|Esc}} key.
通过按{{key|Esc}}键取消选择画笔。


{{clr}}
{{clr}}


== 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 <code>dev/dev_measuregeneric01b</code> texture.
只是为了说明如何改变笔刷面的纹理,让我们改变所有的地板和天花板的纹理为<code>dev/dev_measuregeneric01b</code>纹理。


To edit individual faces of brushes, click on the [[Image:Hammer_ToggleTextureApplication.png]] '''Texture application mode''' button on the '''Tool''' bar.
编辑笔刷的各个面,在'''Tool'''栏中单击[[Image:Hammer_ToggleTextureApplication.png]]'''Texture application mode'''按钮。


[[Image:l4d_hammer_face_edit_00.jpg|thumb|right|300px|caption|The Face Edit Sheet dialog box.]]
[[Image:l4d_hammer_face_edit_00.jpg|thumb|right|300px|caption|“Face Edit Sheet”对话框。]]


You will see the '''Face Edit Sheet''' dialog box appear.
你将看到'''Face Edit Sheet'''对话框。


{{clr}}
{{clr}}


[[Image:l4d_hammer_texture_face_01.jpg|thumb|right|500px|caption|Lifting a texture from an existing face.]]
[[Image:l4d_hammer_texture_face_01.jpg|thumb|right|500px|caption|从现有面提升纹理。]]


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.
你可以浏览纹理,就像当你使用'''Texture'''栏的'''Browse'''来查找纹理,或者你可以从现有的面“提升”。


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 <code>measuregeneric</code> texture on the '''Face Edit''' panel.
你会注意到这会将'''Face Edit'''面板上的缩略图替换为<code>measuregeneric</code>纹理。


{{clr}}
{{clr}}


[[Image:l4d_hammer_texture_face_02.jpg|thumb|right|500px|caption|Applying a texture to a face.]]
[[Image:l4d_hammer_texture_face_02.jpg|thumb|right|500px|caption|应用纹理到一个面。]]


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.
在你创建的窗台的顶部'''右键单击'''以给它与地板相同的灰色纹理。


{{clr}}
{{clr}}


== 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.
切换到[[Image:Hammer_entity.png]] '''Entity Tool''',并从'''Entity'''栏的'''Objects'''下拉菜单中选择“<code>[[prop_static]]</code>”,如果它还没有设置为这个。


Place a prop_static by clicking on the back wall that you just widened.
通过点击你刚刚扩大的后墙以放置prop_static。


[[Image:l4d_hammer_ladder_04.jpg|thumb|right|500px|caption|Selecting a ladder from the Model Browser.]]
[[Image:l4d_hammer_ladder_04.jpg|thumb|right|500px|caption|在模型浏览器中选择梯子。]]


Deselect the prop_static by pressing the {{key|Esc}} key then '''double-click''' on it to bring up its properties.
{{key|Esc}}键取消选择prop_static,然后'''双击'''它以显示其属性。


Click on the '''World Model''' row.
单击'''World Model'''行。


Click on the '''Browse''' on the right of the O'''bject Properties''' dialog box.
单击'''Object Properties'''对话框右侧的'''Browse'''


Type "<code>ladder</code>" into the '''Filter''' field.
在'''Filter'''字段中输入“<code>ladder</code>”。


Select "<code>props_c17/metalladder002.mdl</code> and then click '''OK'''.
选择“<code>props_c17/metalladder002.mdl</code>”然后单击'''OK'''


Click '''Apply''' on the '''Object Properties''' dialog.
单击'''Object Properties'''对话框里的'''Apply'''


{{clr}}
{{clr}}


[[Image:l4d_hammer_ladder_05.jpg|thumb|right|500px|caption|Placing the ladder.]]
[[Image:l4d_hammer_ladder_05.jpg|thumb|right|500px|caption|放置梯子。]]


You should now have the ladder where you placed your prop_static.
你现在应该有个梯子在你放置你的prop_static的地方。


{{clr}}
{{clr}}


[[Image:l4d_hammer_ladder_06.jpg|thumb|right|500px|caption|Moving the ladder into position.]]
[[Image:l4d_hammer_ladder_06.jpg|thumb|right|500px|caption|将梯子移动到位。]]


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.
切换回'''Selection tool''',然后旋转并移动你的梯子,这样它就在这个后壁的中间,并且底部接触地板。


{{clr}}
{{clr}}


== Creating a func_ladder ==
== 创建一个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.
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.

Revision as of 02:28, 20 February 2017

Template:Otherlang2

译者:joyo_a(百度ID)

接下来我们将返回Hammer来添加一个梯子到我们的地图。

创建tutorial02.vmf

我们要做的第一件事是我们为在上一节中使用的地图创建一个新版本的地图。

在Hammer里,打开你先前创建的地图文件tutorial01.vmf(如果你还没有打开)。默认情况下,它应位于mapsrc文件夹中:

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

现在我们将建立一个新版本来工作并完成它:

  • 转到文件File,然后选择Save As...
  • 更改名字为tutorial02.vmf

建造房间

首先,选择在第一个房间教程中创建的第二个房间的天花板。

将笔刷向上移动128个单位。

在第二个房间中选择墙壁笔刷并复制它们使新的墙壁搁置在旧的墙上。

Template:注意

你修改的房间应该看起来像这样:

复制墙壁以创建一个更高的房间。

你现在将看到一个我们包含的房间和走廊之外的黑色的洞。如果有一个洞或“leak”到地图的外部,地图将无法正确编译或正确运行。我们来修复它。

确保正确密封地图。

选择墙的上面部分到洞的一侧。

通过拖动拐角手柄来扩大其大小以覆盖开口。

创建一个窗台

使其中一个底壁为一个壁架。

现在在3D视图中单击第二个房间中后墙的下部。

使用顶部视图,将墙扩大到房间,使其宽128个单位,形成一个窗台。

通过按Esc键取消选择画笔。

纹理一个笔刷面

只是为了说明如何改变笔刷面的纹理,让我们改变所有的地板和天花板的纹理为dev/dev_measuregeneric01b纹理。

编辑笔刷的各个面,在Tool栏中单击Hammer ToggleTextureApplication.pngTexture application mode按钮。

“Face Edit Sheet”对话框。

你将看到Face Edit Sheet对话框。

从现有面提升纹理。

你可以浏览纹理,就像当你使用Texture栏的Browse来查找纹理,或者你可以从现有的面“提升”。

要从现有的面提升,只需在您看到灰色显影剂纹理的地板上左键单击

你会注意到这会将Face Edit面板上的缩略图替换为measuregeneric纹理。

应用纹理到一个面。

要将它应用到另一个面,只需在要接收纹理的面上右键单击

在你创建的窗台的顶部右键单击以给它与地板相同的灰色纹理。

放置一个梯子模型

切换到Hammer entity.png Entity Tool,并从Entity栏的Objects下拉菜单中选择“prop_static”,如果它还没有设置为这个。

通过点击你刚刚扩大的后墙以放置prop_static。

在模型浏览器中选择梯子。

Esc键取消选择prop_static,然后双击它以显示其属性。

单击World Model行。

单击Object Properties对话框右侧的Browse

Filter字段中输入“ladder”。

选择“props_c17/metalladder002.mdl”然后单击OK

单击Object Properties对话框里的Apply

放置梯子。

你现在应该有个梯子在你放置你的prop_static的地方。

将梯子移动到位。

切换回Selection tool,然后旋转并移动你的梯子,这样它就在这个后壁的中间,并且底部接触地板。

创建一个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.png提示: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.png提示: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.

Compile the level

The ladder in the game.

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

Note.png注意: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.

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.

See also