Creating multiple buttons for one door: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
==Introduction==
{{wip}}
This tutorial will detail the basics of getting a door to open only when two (or more) buttons are activated.
 
==Door, Buttons, and Triggers==
Create your doorway and two buttons by following the tutorial for [[Creating a button and door|creating a button and linked door]] through step 5 of the section titled "Triggers".
{{note|Your buttons and triggers should be distinct from one another. Check all of the following on each button to make sure you have changed the '''button_*''' prefix to '''button#_*''', with # representing which button it is:
* The name of the movement door under the button (originally '''button_top_door''')
* The parent of your '''button_top_model''' (same as above)
* The name of the two triggers '''button_trigger_player''' and '''button_trigger_box'''}}
 
Next, complete steps 7 and 8 under [[Creating a button and door#Triggers|Triggers]] on the other tutorial for each button, making sure that you are using the appropriate '''button#_*''' prefix.
 
==Setting the Buttons to Open the Door==
Create a [[math_counter]] entity, and put it near your door.  Set the following properties:
::{|
!  Property Name || Value
|-
| Name || buttoncounter
|-
| Minimum Legal Value || -1
|-
| Maximum Legal Value || 2
|}
Now go to the Outputs tab and set the following outputs:
::{|
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[Image:Io11.png]] || OnHitMax || door_left || Open || <none> || 0.00 || No
|-
| [[Image:Io11.png]] || OnHitMax || door_right || Open || <none> || 0.00 || No
|-
| [[Image:Io11.png]] || OnHitMax || buttoncounter || SetHitMin || 1 || 0.00 || No
|-
| [[Image:Io11.png]] || OnHitMin || door_left || Close || <none> || 0.00 || No
|-
| [[Image:Io11.png]] || OnHitMin || door_right || Close || <none> || 0.00 || No
|-
| [[Image:Io11.png]] || OnHitMin || buttoncounter || SetHitMin || -1 || 0.00 || No
|}

Revision as of 05:01, 23 November 2007

Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.