Difference between revisions of "L4D关卡制作/救援(第二部分)"

From Valve Developer Community
Jump to: navigation, search
m
(Delete: unused.)
(Tag: Removed redirect)
 
Line 1: Line 1:
#REDIRECT [[L4D Level Design/Finale Events Part 2:zh-cn]]
+
{{delete|Unused.}}
{{lang|L4D Level Design/Finale Events Part 2}}
 
 
 
译者:海天
 
 
 
{{L4D level intro menu}}
 
 
 
== 创建一个逃生载具 ==
 
 
 
现在,让我们制作逃生载具。
 
在求生之路,每个战役各有不同的逃生载具. 如:直升机,船,飞机,APC装甲车。
 
实际上任何都行.甚至是一个敞开门的房间。
 
在tutorial_standards map,则是一节地铁那么在这个关卡中 你能学会如何让物体移动。
 
 
 
[[Image:l4d_hammer_escape_01.jpg|thumb|left|500px|caption|选择地铁模型]]{{clr}}
 
 
 
=== 放置一个 prop_dynamic ===
 
 
 
[[Image:l4d_hammer_escape_02.jpg|thumb|right|500px|caption|选择地铁汽车模型.]]
 
 
 
制作你自己的地铁逃生载具,首先得放置这个模型,不能用prop_static,得用prop_dynamic才能让它移动。
 
用'''Entity Tool'''从'''Objects'''下拉菜单选择“prop_dynamic”。
 
打开它的属性并点击World model这一行 再点击右边的“Browse”按钮。
 
在过滤区输入 “subway”并选择模型“props_unique\subwaycar_all_onetexture.mdl”。
 
点击OK。关闭属性。
 
现在有了做为逃生载具的模型.现在我们需要一个刷子实体func_tracktrain来让模型移动。
 
 
 
{{clr}}
 
 
 
=== 建立一个 func_tracktrain ===
 
 
 
[[Image:l4d_hammer_escape_03.jpg|thumb|right|500px|caption|给地铁列车移动建立一个Brush.]]
 
 
 
选择 '''Block Tool'''.
 
 
 
在 '''Top''' 视图, 画一个大概和地铁列车一样大小的Brush然后按{{key|Enter}}键建立。
 
 
 
在 '''Side''' 或 '''Front''' 视图, 收缩brush以便它在地铁列车的地底下。
 
 
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_04.jpg|thumb|right|200px|caption|The tools/toolsnodraw 材质.]]
 
 
 
在Brush还被选择的时候, 点击 '''Browse''' 键在 '''Texture''' 栏.
 
 
 
输入 "nodraw" 在过滤器并选择材质 "tools/toolsnodraw".
 
 
 
双击它使它变为目前的材质.
 
 
 
点击 '''Apply current texture''' 工具去应用它已选的Brush.
 
 
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_05.jpg|thumb|right|500px|caption|The func_tracktrain 属性.]]
 
 
 
在Brush还被选择的时候, 按{{key|Ctrl}}+{{key|T}}.
 
 
 
* 改 '''Class''' 为 "func_tracktrain". 点击 Apply 会看到种类属性为 func_tracktrain.
 
* 命名 '''Name''' 为 "train".
 
* 改 '''First Stop Target''' 为 "train_track01".
 
* 改 '''Max Speed''' 为 "25".
 
* 改 '''Height above track''' 为 "0"
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_06.jpg|thumb|right|500px|caption|func_tracktrain的Flag栏.]]
 
 
 
转到 '''Flags''' 栏.
 
 
 
* 勾选 '''No User Control'''.
 
* 勾选 '''Fixed Orientation'''.
 
* 勾选 '''Is unblockable by player'''.
 
 
 
点击 '''Apply''' 然后关闭窗口.
 
 
 
{{clr}}
 
 
 
=== 添加 path_track 实体 ===
 
 
 
[[Image:l4d_hammer_escape_07.jpg|thumb|right|500px|caption|The path_track 属性.]]
 
 
 
现在呢我们要做条路线让列车移动。
 
 
 
点击 '''Entity Tool''' 并选择 "path_track" 来自 '''Objects''' 的下拉菜单.
 
 
 
放置 <code>path_track</code> 在 '''Camera''' 视图 列车中央附近,用{{key|Alt}}+{{key|Enter}}打开它的属性.
 
 
 
命名 '''Name''' 为 "train_track01".
 
 
 
改 '''Next Stop Target''' 为 "train_track02".
 
 
 
点击 '''Apply''' 后关掉属性窗口.
 
 
 
{{clr}}
 
 
 
在 '''Top''' 和 '''Front''' 视图, 挪动 path_track 准确地到 <code>func_tracktrain</code> brush 的中间. 点击<code>func_tracktrain</code>你可以发现这个准确的位置并看到助手结点 (默认的,在中间). 你可以移动助手结点, 但确保你移动的这个 <code>path_trac</code> 是助手结点所在地.
 
 
 
回到 '''Entity Tool''' 并放置另外一个 <code>path_track</code> 到你想放的地方游戏电脑人能接应的。
 
 
 
打开它的属性命名 '''Name''' 为 "train_track02" 和 '''Next Stop Target''' 为 "train_track03".
 
 
 
回到 '''Entity Tool''', 放置第三个 <code>path_track</code> 到列车上做最终救援成功的位置。
 
 
 
打开它的属性命名 '''Name''' 为 "train_track03".
 
 
 
=== 父处理 the prop_dynamic 到 func_tracktrain ===
 
 
 
[[Image:l4d_hammer_escape_08.jpg|thumb|right|500px|caption|The prop_dynamic 属性.]]
 
 
 
回到 <code>prop_dynamic</code> 地铁列车模型并打开它的属性.
 
 
 
改 '''Parent''' 为 "train". 这会父处理地铁列车模型到 <code>func_tracktrain</code>. 无论 <code>func_tracktrain</code> 何时移动, 列车会随着它移动.
 
 
 
现在, 我们需要 code>trigger_multiple</code> 检验所有幸存者是否能登上列车.
 
 
 
{{clr}}
 
 
 
== 建立一个 trigger_multiple ==
 
 
 
[[Image:l4d_hammer_escape_10.jpg|thumb|right|500px|caption|Creating a brush for the trigger_multiple.]]
 
 
 
Draw a brush with that '''Block Tool''' that is contained inside the subway car at the position where it picks up the Survivors.
 
 
 
{{clr}}
 
 
 
[[Image:Toolstrigger.gif|left|The "tools/toolstrigger" texture.]]
 
 
 
Click on the '''Browse''' button in the '''Texture''' bar.
 
 
 
Type "trigger" in the filter and select the "tools/toolstrigger" texture.
 
 
 
Double-click on it to make it the current texture.
 
 
 
Apply the texture to the selected brush.
 
 
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_11.jpg|thumb|right|500px|caption|The trigger_multiple properties.]]
 
 
 
Press {{key|Ctrl}}+{{key|T}} to make it a brush entity.
 
 
 
Change the '''Class''' to "trigger_multiple" and click '''Apply''' to see the properties for a <code>trigger_multiple</code>.
 
 
 
* Change the '''Name''' to "train_trigger".
 
* Change '''Start Disabled''' to "Yes".
 
* Change '''Entire Team Number''' to "Survivor".
 
 
 
{{clr}}
 
 
 
{{note|This trigger starts as disabled so that the survivors can't trigger it before the subway car picks them up. We will enable it later.}}
 
 
 
[[Image:l4d_hammer_escape_12.jpg|thumb|right|500px|caption|The '''Flags''' tab of the trigger_multiple.]]
 
 
 
Switch to the '''Flags''' tab.
 
 
 
Make sure the box for '''Clients''' is checked.
 
 
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_13.jpg|thumb|right|500px|caption|The '''Outputs''' tab of the trigger_multiple.]]
 
 
 
Switch to the '''Outputs''' tab.
 
 
 
Add an output with the following:
 
* '''My output named''': "OnEntireTeamStartTouch"
 
* '''Targets entities named''': "train_continue_relay"
 
* '''Via this input''': "Trigger"
 
 
 
This trigger will now send a Trigger output to a <code>logic_relay</code> called "train_continue_relay" when all the survivors are touching it.
 
 
 
{{clr}}
 
 
 
Now, let's set up the <code>logic_relay</code> of all the things that should happen when the survivors touch the trigger.
 
 
 
[[Image:l4d_hammer_escape_14.jpg|thumb|right|500px|caption|The <code>logic_relay</code> properties for the train to continue.]]
 
 
 
In the '''Entity Tool''', select "logic_relay" from the '''Objects''' drop-down menu.
 
 
 
Place the <code>logic_relay</code> in the '''Camera''' viewport near where the "train_trigger" is, and open up its properties.
 
 
 
Change the '''Name''' to "train_continue_relay".
 
 
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_15.jpg|thumb|right|500px|caption|The Outputs tab for the train_continue_relay.]]
 
 
 
Switch to the '''Outputs''' tab.
 
 
 
Add an output with the following:
 
* '''My output named''': "OnTrigger"
 
* '''Targets entities named''': "train"
 
* '''Via this input''': "StartForward"
 
 
 
Add an output with the following:
 
* '''My output named''': "OnTrigger"
 
* '''Targets entities named''': "radio"
 
* '''Via this input''': "FinaleEscapeForceSurvivorPositions"
 
 
 
This means that the train will continue to move forward when all the survivors who are alive and not incapacitated have touched the "train_trigger" and this <code>logic_relay</code> will also teleport the Survivors to positions where they are safe from harm.
 
 
 
We'll need to place the Survivor positions where they will teleport to when the escape occurs.{{clr}}
 
 
 
== Placing the info_survivor_positions ==
 
 
 
[[Image:l4d_hammer_escape_16.jpg|thumb|right|500px|caption|Placing the info_survivor_positions for the escape vehicle.]]
 
 
 
Go to the '''Entity Tool''' and select "info_survivor_position" from the '''Objects''' drop-down menu.
 
 
 
Place 4 of these in the Camera viewport where they can't be touched by the infected team.
 
 
 
This might require you to build a small container for them off the level as shown in tutorial_standards.vmf.
 
 
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_17.jpg|thumb|right|500px|caption|The info_survivor_position properties for the escape vehicle.]]
 
 
 
Open the properties for each one.
 
 
 
Change the '''Name''' of the first one to "train_survivor_pos1".
 
 
 
Change the '''Name''' of the second one to "train_survivor_pos2".
 
 
 
Change the '''Order''' of the second one to "2".
 
 
 
Change the '''Name''' of the third one to "train_survivor_pos3".
 
 
 
Change the '''Order''' of the third one to "3".
 
 
 
Change the '''Name''' of the fourth one to "train_survivor_pos4".
 
 
 
Change the '''Order''' of the fourth one to "4".
 
 
 
{{clr}}
 
 
 
== Completing the Escape Vehicle ==
 
 
 
[[Image:l4d_hammer_escape_09.jpg|thumb|right|500px|caption|The Outputs tab of the train_track02 path_track.]]
 
 
 
Go back to "train_track02" and open up its properties.
 
 
 
Switch to the '''Outputs''' tab.
 
 
 
In the tutorial_standards map, there are other outputs hooked up for doors to open, infected to get killed if they get in the way, and survivors to get pushed out of the way. Ignore these for now and just add these outputs:
 
 
 
Add an output with the following:
 
* '''My output named''': "OnPass"
 
* '''Targets entities named''' :"train"
 
* '''Via this input''': "Stop"
 
 
 
This will stop the train when it gets to this <code>path_track</code> where it will pick up the survivors.
 
 
 
Add an output with the following:
 
* '''My output named''': "OnPass"
 
* '''Targets entities named''': "train_trigger"
 
* '''Via this input''': "Enable"
 
 
 
This is the output that will enable our trigger_multiple.
 
 
 
Add another output with the following:
 
* '''My output named''': "OnPass"
 
* '''Targets entities named''': "radio"
 
* '''Via this input''': "FinaleEscapeVehicleReadyForSurvivors"
 
 
 
This will tell the survivor bots to get to the nav area marked with the "RESCUE_VEHICLE" attribute.{{clr}}
 
 
 
[[Image:l4d_hammer_escape_18.jpg|thumb|right|500px|caption|Creating a logic_relay for the train to start.]]
 
 
 
We still need something to send an input to the <code>func_tracktrain</code> to start from its initial position to the survivor pick up position.
 
 
 
Go into the '''Entity Tool''' and select "logic_relay" from the '''Objects''' drop-down menu.
 
 
 
Place it near the "train_continue_relay" entity and open its properties.
 
 
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_19.jpg|thumb|right|500px|caption|The Outputs tab for the train_start_relay.]]
 
 
 
Change the '''Name''' to "train_start_relay".
 
 
 
Switch to the '''Outputs''' tab.
 
 
 
Add an output with the following:
 
* '''My output named''': "OnTrigger"
 
* '''Targets entities named''': "train"
 
* '''Via this input''': "StartForward"
 
 
 
Click '''Apply''' and close the properties window.
 
 
 
{{clr}}
 
 
 
Now, go back to the <code>trigger_finale</code> (the radio model) and open its properties again.
 
 
 
[[Image:l4d_hammer_escape_20.jpg|thumb|right|500px|caption|Adding an output to the trigger_finale.]]
 
 
 
Add an output with the following:
 
* '''My output named''': "FinaleEscapeStarted"
 
* '''Targets entities named''': "train_start_relay"
 
* '''Via this input''': "Trigger"
 
 
 
The <code>trigger_finale</code> will now start the train when the escape phase of the finale starts.
 
 
 
{{clr}}
 
 
 
We still need an output to the trigger_finale that will tell it that the escape is complete.
 
 
 
[[Image:l4d_hammer_escape_23.jpg|thumb|right|500px|caption|Creating a <code>logic_relay</code> for the train to escape.]]
 
 
 
Go to the '''Entity Tool''' and select "logic_relay" from the '''Objects''' list.
 
 
 
Place it in the '''Camera''' viewport and open up its properties.
 
 
 
Change the '''Name''' to "train_end_relay".
 
 
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_22.jpg|thumb|right|500px|caption|The Outputs tab for the train_end_relay.]]
 
 
 
Switch to the '''Outputs''' tab.
 
 
 
Add an output with the following:
 
* '''My output named''': "OnTrigger"
 
* '''Targets entities named''': "radio"
 
* '''Via this input''': "FinaleEscapeFinished"
 
* '''After a delay in seconds''': "2"
 
 
 
This will tell the <code>trigger_finale</code> that the survivors have escaped 2 seconds after being triggered.
 
 
 
{{clr}}
 
 
 
[[Image:l4d_hammer_escape_24.jpg|thumb|right|500px|caption|The Outputs tab for the train_continue_relay.]]
 
 
 
Go back to the "train_continue_relay" and open up its properties.
 
 
 
Switch to the '''Outputs''' tab.
 
 
 
Add an output with the following:
 
* '''My output named''': "OnTrigger"
 
* '''Targets entities named''': "train_end_relay"
 
* '''Via this input''': "Trigger"
 
 
 
We could have put the <code>FinaleEscapeFinished</code> output here but we're preparing to add other things for the "train_end_relay".
 
 
 
{{clr}}
 
 
 
=== Updating the Nav ===
 
 
 
We will now need to update the nav to include the RESCUE_VEHICLE areas.
 
 
 
Save and compile the map with {{key|F9}}.
 
 
 
When the level loads, enter nav edit mode with {{key|Page_Down}}.
 
 
 
Use <code>noclip</code> {{key|N}} to get to where the subway car picks up the survivors. You'll notice that the subway car is in its initial position. You don't have to play through the finale to get it to its pick up position.
 
 
 
Simply bring down the console and type "<code>ent_fire train_start_relay trigger</code>" and press {{key|Enter}}.
 
 
 
[[Image:l4d_hammer_escape_21.jpg|thumb|right|500px|caption|The nav for the rescue vehicle.]]
 
 
 
Once the subway car is in position, you can place a <code>nav_mark_walkable</code> {{key|M}} inside it and use <code>nav_generate_incremental</code> {{key|B}} to build the nave mesh for it.
 
 
 
Make sure that the nav areas inside the subway car are connected to the rest of the level.
 
 
 
You should see a light blue (cyan) line connecting the areas.
 
 
 
{{note|Areas can be connected with one-way and two-way connections. A '''light blue''' line means it's a two-way connection. A '''dark blue''' line means it's a one-way connection.}}
 
 
 
If the areas are not connected, select both of the areas that you want to be connected and use <code>nav_connect</code> {{key|Insert}}.
 
 
 
{{tip|If you want to make a ''one-way'' connection between areas, you select the first area and ''point'' (not select) to the second area and do a "nav_connect". This is used for things like one-way drops.)}}{{clr}}
 
 
 
Select all the nav areas inside the subway car and use "<code>mark RESCUE_VEHICLE</code>" in the console to mark them with that attribute.
 
 
 
These are all the things necessary for a finale to work properly. Now, we can add some of the optional components of the finale.
 
 
 
{{NavBar|L4D Level Design/Finale Events Part 1|L4D Level Design Basics Tutorial|L4D Level Design/Finale Events Part 3}}
 
 
 
[[Category:Left 4 Dead:zh-cn]]
 
[[Category:Left 4 Dead 2:zh-cn]]
 
[[Category:Level Design:zh-cn]]
 

Latest revision as of 19:42, 25 January 2023

Warning icon.png
This article has been marked as a candidate for speedy deletion for the following reason:
Unused.
If you object to this decision, then please discuss why hereIf this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators - Remember to check if anything links here and the page history (last edit) before deleting.