Floor button: Difference between revisions
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
| Move Direction || (This will be different for which way your door is facing) | | Move Direction || (This will be different for which way your door is facing) | ||
|} | |} | ||
Also make sure that you uncheck ''Touch opens'' under ''Flags''. | |||
{{note|You can also put a blocking damage if you don't want the player to get stuck inside it. Also, you can turn on Forced Closed for it to close even if the player tried to jam it open with a camera or cube.}} | {{note|You can also put a blocking damage if you don't want the player to get stuck inside it. Also, you can turn on Forced Closed for it to close even if the player tried to jam it open with a camera or cube.}} | ||
[[Image:Buttonanddoor2.jpg|right|200px|Final door.]] | [[Image:Buttonanddoor2.jpg|right|200px|Final door.]] | ||
Line 191: | Line 192: | ||
| BrightnessHDR || 251 159 57 20 | | BrightnessHDR || 251 159 57 20 | ||
|} | |} | ||
[[Image:Buttonanddoor6.jpg|right|200px|The final product.]] | |||
You have now created a button which will open a door by a player standing on the button or a box weighing it down. Only those two things will work on it. Download the tutorial .vmf here. | You have now created a button which will open a door by a player standing on the button or a box weighing it down. Only those two things will work on it. Download the tutorial .vmf [http://www.remmiz.com/portal/maps/buttondoortutorial.vmf | here]. | ||
=Theory= | =Theory= | ||
This is the most basic button and door setup. You can also have the triggers turn off or on other things in the map, have them trigger a [[logic_choreographed_scene]] or just about anything. For the Portal feel you can have them trigger [[Creating indicator lights|indicator lights]] based on the button up or down status. | This is the most basic button and door setup. You can also have the triggers turn off or on other things in the map, have them trigger a [[logic_choreographed_scene]] or just about anything. For the Portal feel you can have them trigger [[Creating indicator lights|indicator lights]] based on the button up or down status. |
Revision as of 01:12, 20 November 2007
Introduction
In this tutorial you will learn how to create a 1500-Megawatt Aperture Science Heavy-Duty Supercolliding Superbutton which whens stepped on or weighted down with a box will open a specified door.
The Door
First thing is to make the door which will open on activation of the button.
Door Frame
1. Create a prop_static in your door way. The World Model should be set to models/props/door_01_frame_reference.mdl or models/props/door_01_frame_wide_reference.mdl (either will work fine).
Doors
1. Create a prop_dynamic with the following settings:
Property Name Value World Model models/props/door_01_lftdoor_reference.mdl Name door_left_model
Align it to the left, inside of the door frame.
2. Create a 56Lx8Wx104H block brush with texture nodraw centered and inside the door model. Tie it to a func_door entity with the following settings:
Property Name Value Name door_left Speed 250 Stop Sound Doors.FullClose8 Delay before Reset -1 Lip 12 Move Direction (This will be different for which way your door is facing)
Also make sure that you uncheck Touch opens under Flags.

3. Repeat steps 1-3 but change the following: For the prop_dynamic:
Property Name Value World Model models/props/door_01_rtdoor_reference.mdl Name door_right_model
And for the func_door:
Property Name Value Name door_right
4. Set the parent of door_left_model (the prop_dynamic) to door_left. Also set the parent of door_right_model to door_right.
The Button
Models
1. Create a prop_static with a World Model of models/props/button_base_reference.mdl.
2. Create a prop_dynamic aligned on top of the prop_static with the following settings:
Property Name Value World Model models/props/button_top_reference.mdl Name button_top_model
Movement
1. Next create a 58Wx59Lx9H cylinder brush with 8 sides and textured with nodraw. Move this brush right underneath your prop_dynamic. Tie the cylinder to a func_door with the following settings:
Property Name Value Name button_top_door Speed 25 Delay before Reset -1 Move Direction 90 0 0 (or Down)
Also make sure nothing is checked under Flags.
2. Set the Parent of button_top_model to be button_top_door.
Triggers
1. Create a 48Wx48Lx1H block brush textured with toolstrigger. Place it right on top of the button_top_model. Tie this brush to a trigger_multiple with the following settings:
Property Name Value Name button_trigger_player
We will set up the Output later.
2. Next create a 7Wx7Lx1H cylinder brush with 8 sides and textured with toolstrigger. Put this brush directly on top and in the center of the button_top_model and tie it to a trigger_multiple with the following settings:
Property Name Value Name button_trigger_box
And the only the following Flags are checked:
- Pushables
- Physics Objects
- Everything (not including physics debris)
We will set up the Output later.
3. Create a filter_activator_name nearby your button with the following settings:
Property Name Value Name button_filter_boxes Filter Name (The name your box entity has)
4. Select your button_trigger_box trigger and set the Filter Name to button_filter_boxes.
5. Create two ambient_generic entities and give one the following settings:
Property Name Value Name button_down Sound Name Portal.button_down Source Entity Name button_top_model
and the other with
Property Name Value Name button_up Sound Name Portal.button_up Source Entity Name button_top_model
6. Now go back and select the cylinder func_door brush under the button, button_top_door and setup the Output as below:
7. Select the larger trigger_multiple, button_trigger_player and setup the Output as below:
8. Select the smaller, cylinder trigger_multiple, button_trigger_box and setup the Output as below'
9. Finally, create a light entity underneath the top of the button but still inside the base. Give it the following properties:
Property Name Value Brightness 251 159 57 30 BrightnessHDR 251 159 57 20
You have now created a button which will open a door by a player standing on the button or a box weighing it down. Only those two things will work on it. Download the tutorial .vmf | here.
Theory
This is the most basic button and door setup. You can also have the triggers turn off or on other things in the map, have them trigger a logic_choreographed_scene or just about anything. For the Portal feel you can have them trigger indicator lights based on the button up or down status.