L4D Level Design/Elevators: Difference between revisions
ThaiGrocer (talk | contribs) mNo edit summary |
Thunder4ik (talk | contribs) m (Unicodifying, replaced: [[Image: → [[File: (12)) |
||
(12 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{lang|L4D Level Design|Elevators}} | ||
{{L4D level intro menu}} | {{L4D level intro menu}} | ||
Line 7: | Line 8: | ||
An example of a func_elevator made purely from brushes can be found in tutorial_standards.vmf. | An example of a func_elevator made purely from brushes can be found in tutorial_standards.vmf. | ||
{{todo|Might be a good idea to add as an extra how to correctly light an elevator and give it doors.}} | |||
== Creating the brush elevator == | == Creating the brush elevator == | ||
[[ | [[File:l4d_hammer_elevator_01.jpg|thumb|left|500px|caption|The func_elevator example in the tutorial_standards map.]]{{clr}} | ||
Create a brush or multiple brushes that you want to be the func_elevator. | Create a brush or multiple brushes that you want to be the func_elevator. | ||
Line 15: | Line 18: | ||
Select them and press {{key|Ctrl}}+{{key|T}} to tie them into an entity. Select "func_elevator" from the drop down menu. | Select them and press {{key|Ctrl}}+{{key|T}} to tie them into an entity. Select "func_elevator" from the drop down menu. | ||
[[ | {{note|To avoid the navigation mesh not detecting the inside of your elevator as one, it's better to only make the floor the func_elevator, the rest is better as a solid [[func_brush]] that is parented to the elevator.}} | ||
[[File:l4d_hammer_elevator_02.jpg|thumb|left|500px|caption|The func_elevator properties.]]{{clr}} | |||
Change the name to a unique name. | Change the name to a unique name. | ||
Line 25: | Line 30: | ||
In the '''Front''' or '''Side''' viewport, you can see the helper nodes that represent the Top and Bottom floor positions. | In the '''Front''' or '''Side''' viewport, you can see the helper nodes that represent the Top and Bottom floor positions. | ||
[[ | [[File:l4d_hammer_elevator_06.jpg|thumb|left|500px|caption|The helper nodes for the func_elevator.]]{{clr}} | ||
{{note|The elevator has been placed in its own user VisGroup. Click on the '''Auto''' tab in the '''VisGroups''' panel and uncheck '''Auto'''. Then, switch back to the '''User''' tab and check the '''Elevator''' box to just see the elevator and its related entities.}} | {{note|The elevator has been placed in its own user VisGroup. Click on the '''Auto''' tab in the '''VisGroups''' panel and uncheck '''Auto'''. Then, switch back to the '''User''' tab and check the '''Elevator''' box to just see the elevator and its related entities.}} | ||
Move the '''Bottom floor position''' helper node by left-clicking inside the circle of the node and dragging down to where you want the elevator to descend to. | First modify the last value of the '''Bottom floor position''' coordinates so you can see the node. Move the '''Bottom floor position''' helper node by left-clicking inside the circle of the node and dragging it down to where you want the elevator to descend to. | ||
== Adding floors == | == Adding floors == | ||
In order for you to be able to tell the elevator to go to a certain floor, you'll need to place info_elevator_floor entities. | In order for you to be able to tell the elevator to go to a certain floor, you'll need to place [[info_elevator_floor]] entities. | ||
Go to the '''Entity Tool''' and select "info_elevator_floor" from the '''Objects''' drop-down menu. | Go to the '''Entity Tool''' and select "info_elevator_floor" from the '''Objects''' drop-down menu. | ||
Line 40: | Line 45: | ||
In the '''Side''' or '''Front''' viewports, move them so that one is where the '''Top floor position''' of the func_elevator is and one is where the '''Bottom floor position''' of the func_elevator is. | In the '''Side''' or '''Front''' viewports, move them so that one is where the '''Top floor position''' of the func_elevator is and one is where the '''Bottom floor position''' of the func_elevator is. | ||
[[ | [[File:l4d_hammer_elevator_03.jpg|thumb|left|500px|caption|The info_elevator_floor entity designates the name of the floor position for the func_elevator.]]{{clr}} | ||
Open the properties for the bottom one by pressing {{key|Alt}}+{{key|Enter}}. | Open the properties for the bottom one by pressing {{key|Alt}}+{{key|Enter}}. | ||
[[ | [[File:l4d_hammer_elevator_04.jpg|thumb|left|500px|caption|The info_elevator_floor properties.]]{{clr}} | ||
Change the '''Name''' to "bottom". | Change the '''Name''' to "bottom". | ||
Line 52: | Line 57: | ||
== Controlling the elevator == | == Controlling the elevator == | ||
[[ | [[File:l4d_hammer_elevator_07.jpg|thumb|right|500px|caption|The func_button example in the tutorial_standards map.]] | ||
Now, you'll need something to send an input to the func_elevator to tell it to move. | Now, you'll need something to send an input to the func_elevator to tell it to move. | ||
Line 58: | Line 63: | ||
In the tutorial_standards map, there is a <code>func_button</code> that the survivors can press.{{clr}} | In the tutorial_standards map, there is a <code>func_button</code> that the survivors can press.{{clr}} | ||
[[ | [[File:l4d_hammer_elevator_08.jpg|thumb|right|500px|caption|The func_button properties.]] | ||
To create a <code>func_button</code>, create a brush and use {{key|Ctrl}}+{{key|T}} to tie it to an entity. Choose "<code>func_button</code>" from the drop down menu.{{clr}} | To create a <code>func_button</code>, create a brush and use {{key|Ctrl}}+{{key|T}} to tie it to an entity. Choose "<code>func_button</code>" from the drop down menu.{{clr}} | ||
[[ | [[File:l4d_hammer_elevator_09.jpg|thumb|right|500px|caption|The '''Flags''' tab for the func_button.]] | ||
There are several properties that depend on how you want your button to work, but for now, simply leave them all as default but change the '''Name''' to "button". | There are several properties that depend on how you want your button to work, but for now, simply leave them all as default but change the '''Name''' to "button". | ||
Line 73: | Line 78: | ||
This means that the survivors can press it with +use and the button won't move when pressed.{{clr}} | This means that the survivors can press it with +use and the button won't move when pressed.{{clr}} | ||
[[ | [[File:l4d_hammer_elevator_10.jpg|thumb|right|500px|caption|Adding an output for the elevator to the func_button.]] | ||
Now switch to the '''Outputs''' tab. | Now switch to the '''Outputs''' tab. | ||
Line 83: | Line 88: | ||
* Change the '''Via this input''' field to "Trigger".{{clr}} | * Change the '''Via this input''' field to "Trigger".{{clr}} | ||
[[ | [[File:l4d_hammer_elevator_11.jpg|thumb|right|500px|caption|Creating a logic_relay for the elevator to come down.]] | ||
Now we need to create the <code>elevator_down_relay</code> entity that will relay the messages we want sent when the button is pressed. | Now we need to create the <code>elevator_down_relay</code> entity that will relay the messages we want sent when the button is pressed. | ||
Line 95: | Line 100: | ||
Change the name to "elevator_down_relay" to match the output we are sending from the func_button.{{clr}} | Change the name to "elevator_down_relay" to match the output we are sending from the func_button.{{clr}} | ||
[[ | [[File:l4d_hammer_elevator_12.jpg|thumb|right|500px|caption|The Outputs tab for the logic_relay.]] | ||
Switch to the '''Outputs''' tab and add a new output with the following fields: | Switch to the '''Outputs''' tab and add a new output with the following fields: | ||
Line 109: | Line 114: | ||
Depending on the setting for your elevator, you might need to tell the elevator to move to the other position. Look at the <code>func_button</code> on the <code>func_elevator</code> in tutorial_standards.vmf for an example.{{clr}} | Depending on the setting for your elevator, you might need to tell the elevator to move to the other position. Look at the <code>func_button</code> on the <code>func_elevator</code> in tutorial_standards.vmf for an example.{{clr}} | ||
[[ | == Adding to the nav == | ||
[[File:l4d_nav_elevator_01.jpg|thumb|right|400px|caption|Editing the nav for the <code>func_elevator</code>.]] | |||
Editing the nav for a func_elevator requires you to put the elevator in each position it can be in, placing a nav_mark_walkable ({{key|M}}) on it and building incremental nav ({{key|B}}). | Editing the nav for a func_elevator requires you to put the elevator in each position it can be in, placing a nav_mark_walkable ({{key|M}}) on it and building incremental nav ({{key|B}}). | ||
The elevator nav will need further refining later on. Please consider troubleshooting with [[Sorting_out_navigation_flow#Elevators|Sorting Out Navigation Flow]] when you are ready to do so. | |||
{{clr}} | {{clr}} | ||
{{NavBar| | {{NavBar|L4D Level Design/Clip Brushes|L4D Level Design Basics Tutorial|L4D Level Design/Panic Events}} | ||
[[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 10:41, 8 January 2024
Left 4 Dead has a unique system for creating elevators that the survivors can ride up and/or down. The nav mesh needs to connect seamlessly throughout the level from where the survivors start to where they need to get. Therefore, the elevators need to connect nav mesh areas vertically.
The brush entity to use for an elevator is called a func_elevator. You can also use a prop that is parented to an invisible func_elevator or a prop with its own animations that with an invisible func_elevator.
An example of a func_elevator made purely from brushes can be found in tutorial_standards.vmf.
Creating the brush elevator
Create a brush or multiple brushes that you want to be the func_elevator.
Select them and press Ctrl+T to tie them into an entity. Select "func_elevator" from the drop down menu.

Change the name to a unique name.
Change the third number in the Bottom floor position to be below the Top floor position by any amount (this will help you move the helper nodes).
Set the Speed value (inches/units per second).
In the Front or Side viewport, you can see the helper nodes that represent the Top and Bottom floor positions.

First modify the last value of the Bottom floor position coordinates so you can see the node. Move the Bottom floor position helper node by left-clicking inside the circle of the node and dragging it down to where you want the elevator to descend to.
Adding floors
In order for you to be able to tell the elevator to go to a certain floor, you'll need to place info_elevator_floor entities.
Go to the Entity Tool and select "info_elevator_floor" from the Objects drop-down menu.
Place two in the Camera viewport under the elevator.
In the Side or Front viewports, move them so that one is where the Top floor position of the func_elevator is and one is where the Bottom floor position of the func_elevator is.
Open the properties for the bottom one by pressing Alt+↵ Enter.
Change the Name to "bottom".
Open the top one and change its Name to "top".
Controlling the elevator
Now, you'll need something to send an input to the func_elevator to tell it to move.
In the tutorial_standards map, there is a func_button
that the survivors can press.
To create a func_button
, create a brush and use Ctrl+T to tie it to an entity. Choose "func_button
" from the drop down menu.
There are several properties that depend on how you want your button to work, but for now, simply leave them all as default but change the Name to "button".
Switch to the Flags tag in the Object Properties and select the following checkboxes:
- Don't move
- Use Activates
This means that the survivors can press it with +use and the button won't move when pressed.
Now switch to the Outputs tab.
Add a new output by clicking on the Add... button near the bottom of the window.
- Change the My output field to "OnPressed".
- Change the Target entities field to "elevator_down_relay".
- Change the Via this input field to "Trigger".
Now we need to create the elevator_down_relay
entity that will relay the messages we want sent when the button is pressed.
In the Entity Tool, select "logic_relay" from the Objects drop-down field.
Place a logic_relay near the func_button.
Open its properties with Alt+↵ Enter.
Change the name to "elevator_down_relay" to match the output we are sending from the func_button.
Switch to the Outputs tab and add a new output with the following fields:
- My output named: OnTrigger
- Targets entities named: elevator
- Via this input: MoveToFloor
- With a parameter override of: bottom
- After a delay in seconds of: 0
This will send the elevator down when the relay is triggered which we trigger when a survivor presses the button.
Depending on the setting for your elevator, you might need to tell the elevator to move to the other position. Look at the func_button
on the func_elevator
in tutorial_standards.vmf for an example.
Editing the nav for a func_elevator requires you to put the elevator in each position it can be in, placing a nav_mark_walkable (M) on it and building incremental nav (B).
The elevator nav will need further refining later on. Please consider troubleshooting with Sorting Out Navigation Flow when you are ready to do so.