L4D Level Design/Finale Events Part 2: Difference between revisions
No edit summary |
Thunder4ik (talk | contribs) m (Unicodifying, replaced: [[Image: → [[File: (25)) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{lang|L4D Level Design|Finale Events Part 2}} | ||
| | |||
{{L4D level intro menu}} | {{L4D level intro menu}} | ||
Line 14: | Line 13: | ||
In the tutorial_standards map, a subway car is used as the escape vehicle so you can see how to use an object that moves in the level. | In the tutorial_standards map, a subway car is used as the escape vehicle so you can see how to use an object that moves in the level. | ||
[[ | [[File:l4d_hammer_escape_01.jpg|thumb|left|500px|caption|The subway car that is the escape vehicle in the tutorial_standards map.]]{{clr}} | ||
=== Placing a prop_dynamic === | === Placing a prop_dynamic === | ||
[[ | [[File:l4d_hammer_escape_02.jpg|thumb|right|500px|caption|Selecting the subway car model.]] | ||
To make your own subway car as an escape vehicle, you'll first need to place the model of the subway car. Instead of a prop_static, which is, well, static, we want to place a prop_dynamic so that it will move. | To make your own subway car as an escape vehicle, you'll first need to place the model of the subway car. Instead of a prop_static, which is, well, static, we want to place a prop_dynamic so that it will move. | ||
Line 38: | Line 37: | ||
=== Creating a func_tracktrain === | === Creating a func_tracktrain === | ||
[[ | [[File:l4d_hammer_escape_03.jpg|thumb|right|500px|caption|Creating a brush for the subway car to move.]] | ||
Go into the '''Block Tool'''. | Go into the '''Block Tool'''. | ||
Line 48: | Line 47: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:l4d_hammer_escape_04.jpg|thumb|right|200px|caption|The tools/toolsnodraw texture.]] | ||
With the brush still selected, click on the '''Browse''' button in the '''Texture''' bar. | With the brush still selected, click on the '''Browse''' button in the '''Texture''' bar. | ||
Line 60: | Line 59: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:l4d_hammer_escape_05.jpg|thumb|right|500px|caption|The func_tracktrain properties.]] | ||
With the brush still selected, press {{key|Ctrl}}+{{key|T}}. | With the brush still selected, press {{key|Ctrl}}+{{key|T}}. | ||
Line 71: | Line 70: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:l4d_hammer_escape_06.jpg|thumb|right|500px|caption|The Flags tab for the func_tracktrain.]] | ||
Switch to the '''Flags''' tab. | Switch to the '''Flags''' tab. | ||
Line 85: | Line 84: | ||
=== Adding path_track entities === | === Adding path_track entities === | ||
[[ | [[File:l4d_hammer_escape_07.jpg|thumb|right|500px|caption|The path_track properties.]] | ||
Now we'll need to create the path for our train to travel on. | Now we'll need to create the path for our train to travel on. | ||
Line 113: | Line 112: | ||
=== Parenting the prop_dynamic to the func_tracktrain === | === Parenting the prop_dynamic to the func_tracktrain === | ||
[[ | [[File:l4d_hammer_escape_08.jpg|thumb|right|500px|caption|The prop_dynamic properties.]] | ||
Go back to the <code>prop_dynamic</code> subway car model and open up its properties. | Go back to the <code>prop_dynamic</code> subway car model and open up its properties. | ||
Line 125: | Line 124: | ||
== Creating the trigger_multiple == | == Creating the trigger_multiple == | ||
[[ | [[File: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. | Draw a brush with that '''Block Tool''' that is contained inside the subway car at the position where it picks up the Survivors. | ||
Line 131: | Line 130: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:Toolstrigger.gif|left|The "tools/toolstrigger" texture.]] | ||
Click on the '''Browse''' button in the '''Texture''' bar. | Click on the '''Browse''' button in the '''Texture''' bar. | ||
Line 143: | Line 142: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:l4d_hammer_escape_11.jpg|thumb|right|500px|caption|The trigger_multiple properties.]] | ||
Press {{key|Ctrl}}+{{key|T}} to make it a brush entity. | Press {{key|Ctrl}}+{{key|T}} to make it a brush entity. | ||
Line 157: | Line 156: | ||
{{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.}} | {{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.}} | ||
[[ | [[File:l4d_hammer_escape_12.jpg|thumb|right|500px|caption|The '''Flags''' tab of the trigger_multiple.]] | ||
Switch to the '''Flags''' tab. | Switch to the '''Flags''' tab. | ||
Line 165: | Line 164: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:l4d_hammer_escape_13.jpg|thumb|right|500px|caption|The '''Outputs''' tab of the trigger_multiple.]] | ||
Switch to the '''Outputs''' tab. | Switch to the '''Outputs''' tab. | ||
Line 180: | Line 179: | ||
Now, let's set up the <code>logic_relay</code> of all the things that should happen when the survivors touch the trigger. | Now, let's set up the <code>logic_relay</code> of all the things that should happen when the survivors touch the trigger. | ||
[[ | [[File: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. | In the '''Entity Tool''', select "logic_relay" from the '''Objects''' drop-down menu. | ||
Line 190: | Line 189: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:l4d_hammer_escape_15.jpg|thumb|right|500px|caption|The Outputs tab for the train_continue_relay.]] | ||
Switch to the '''Outputs''' tab. | Switch to the '''Outputs''' tab. | ||
Line 210: | Line 209: | ||
== Placing the info_survivor_positions == | == Placing the info_survivor_positions == | ||
[[ | [[File: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. | Go to the '''Entity Tool''' and select "info_survivor_position" from the '''Objects''' drop-down menu. | ||
Line 220: | Line 219: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:l4d_hammer_escape_17.jpg|thumb|right|500px|caption|The info_survivor_position properties for the escape vehicle.]] | ||
Open the properties for each one. | Open the properties for each one. | ||
Line 242: | Line 241: | ||
== Completing the Escape Vehicle == | == Completing the Escape Vehicle == | ||
[[ | [[File: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. | Go back to "train_track02" and open up its properties. | ||
Line 271: | Line 270: | ||
This will tell the survivor bots to get to the nav area marked with the "RESCUE_VEHICLE" attribute.{{clr}} | This will tell the survivor bots to get to the nav area marked with the "RESCUE_VEHICLE" attribute.{{clr}} | ||
[[ | [[File: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. | 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. | ||
Line 281: | Line 280: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:l4d_hammer_escape_19.jpg|thumb|right|500px|caption|The Outputs tab for the train_start_relay.]] | ||
Change the '''Name''' to "train_start_relay". | Change the '''Name''' to "train_start_relay". | ||
Line 298: | Line 297: | ||
Now, go back to the <code>trigger_finale</code> (the radio model) and open its properties again. | Now, go back to the <code>trigger_finale</code> (the radio model) and open its properties again. | ||
[[ | [[File:l4d_hammer_escape_20.jpg|thumb|right|500px|caption|Adding an output to the trigger_finale.]] | ||
Add an output with the following: | Add an output with the following: | ||
Line 311: | Line 310: | ||
We still need an output to the trigger_finale that will tell it that the escape is complete. | We still need an output to the trigger_finale that will tell it that the escape is complete. | ||
[[ | [[File: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. | Go to the '''Entity Tool''' and select "logic_relay" from the '''Objects''' list. | ||
Line 321: | Line 320: | ||
{{clr}} | {{clr}} | ||
[[ | [[File:l4d_hammer_escape_22.jpg|thumb|right|500px|caption|The Outputs tab for the train_end_relay.]] | ||
Switch to the '''Outputs''' tab. | Switch to the '''Outputs''' tab. | ||
Line 335: | Line 334: | ||
{{clr}} | {{clr}} | ||
[[ | [[File: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. | Go back to the "train_continue_relay" and open up its properties. | ||
Line 362: | Line 361: | ||
Simply bring down the console and type "<code>ent_fire train_start_relay trigger</code>" and press {{key|Enter}}. | Simply bring down the console and type "<code>ent_fire train_start_relay trigger</code>" and press {{key|Enter}}. | ||
[[ | [[File: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. | 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. |
Latest revision as of 10:41, 8 January 2024
Creating an Escape Vehicle
Now, let's make the escape vehicle.
In Left 4 Dead, each of the four campaigns has a different escape vehicle. There's a helicopter, a boat, an airplane, and an APC.
The escape vehicle can really be anything. It can even just be a room that has a door that is opened at the end of the finale.
In the tutorial_standards map, a subway car is used as the escape vehicle so you can see how to use an object that moves in the level.
Placing a prop_dynamic
To make your own subway car as an escape vehicle, you'll first need to place the model of the subway car. Instead of a prop_static, which is, well, static, we want to place a prop_dynamic so that it will move.
Go to the Entity Tool and select "prop_dynamic" from the Objects drop-down menu.
Open up its properties and click on the World model row and click on the Browse Button on the right side.
Type "subway" in the Filter and select the model "props_unique\subwaycar_all_onetexture.mdl".
Click OK.
Close the properties.
We now have the model that we will use for the escape vehicle. Now we'll need the brush entity to move the model. It's called a func_tracktrain.
Creating a func_tracktrain
Go into the Block Tool.
In the Top viewport, draw a brush approximately the same size as the subway car and press the ↵ Enter key to create it.
In the Side or Front viewport, shrink the brush so that it is just below the floor of the subway car.
With the brush still selected, click on the Browse button in the Texture bar.
Type "nodraw" in the filter and select the texture "tools/toolsnodraw".
Double-click on it to make it the current texture.
Click on the Apply current texture tool in the tool bar to apply it to the selected brush.
With the brush still selected, press Ctrl+T.
- Change the Class to "func_tracktrain". Click on Apply to see the properties for a func_tracktrain.
- Change the Name to "train".
- Change the First Stop Target to "train_track01".
- Change the Max Speed to "25".
- Change Height above track to "0"
Switch to the Flags tab.
- Check the No User Control box.
- Check the Fixed Orientation box.
- Check the Is unblockable by player box.
Click on Apply and close the window.
Adding path_track entities
Now we'll need to create the path for our train to travel on.
Go into the Entity Tool and select "path_track" from the Objects drop-down menu.
Place the path_track
in the Camera viewport near the middle of the subway car and open its properties with Alt+↵ Enter.
Change the Name to "train_track01".
Change the Next Stop Target to "train_track02".
Click on Apply and close the properties window.
In the Top and Front viewports, move the path_track to exactly the middle of the func_tracktrain
brush. You can find this exact position by clicking on the func_tracktrain
and finding the helper node (which, by default, is placed at the middle). You can move the helper node, but make sure you move the path_trac
to wherever that helper node is located.
Go back to the Entity Tool and place another path_track
where you want the train to move to for the survivor pick up.
Open up its properties and change the Name to "train_track02" and the Next Stop Target to "train_track03".
Back in the Entity Tool, place a third path_track
where you want the train to move to escape the level.
Open up its properties and change the Name to "train_track03".
Parenting the prop_dynamic to the func_tracktrain
Go back to the prop_dynamic
subway car model and open up its properties.
Change the Parent to "train". This will parent the subway car model to the func_tracktrain
. Whenever the func_tracktrain
moves, the subway car model will move with it.
Now, we'll need the trigger_multiple
to check if all the Survivors are on board the train.
Creating 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.
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.
Press Ctrl+T to make it a brush entity.
Change the Class to "trigger_multiple" and click Apply to see the properties for a trigger_multiple
.
- Change the Name to "train_trigger".
- Change Start Disabled to "Yes".
- Change Entire Team Number to "Survivor".

Switch to the Flags tab.
Make sure the box for Clients is checked.
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 logic_relay
called "train_continue_relay" when all the survivors are touching it.
Now, let's set up the logic_relay
of all the things that should happen when the survivors touch the trigger.
In the Entity Tool, select "logic_relay" from the Objects drop-down menu.
Place the logic_relay
in the Camera viewport near where the "train_trigger" is, and open up its properties.
Change the Name to "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 logic_relay
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.
Placing the info_survivor_positions
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.
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".
Completing the Escape Vehicle
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 path_track
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.
We still need something to send an input to the func_tracktrain
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.
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.
Now, go back to the trigger_finale
(the radio model) and open its properties again.
Add an output with the following:
- My output named: "FinaleEscapeStarted"
- Targets entities named: "train_start_relay"
- Via this input: "Trigger"
The trigger_finale
will now start the train when the escape phase of the finale starts.
We still need an output to the trigger_finale that will tell it that the escape is complete.
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".
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 trigger_finale
that the survivors have escaped 2 seconds after being triggered.
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 FinaleEscapeFinished
output here but we're preparing to add other things for the "train_end_relay".
We will now need to update the nav to include the RESCUE_VEHICLE areas.
Save and compile the map with F9.
When the level loads, enter nav edit mode with Page_Down.
Use noclip
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 "ent_fire train_start_relay trigger
" and press ↵ Enter.
Once the subway car is in position, you can place a nav_mark_walkable
M inside it and use nav_generate_incremental
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.

If the areas are not connected, select both of the areas that you want to be connected and use nav_connect
Insert.

Select all the nav areas inside the subway car and use "mark RESCUE_VEHICLE
" 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.