Difference between revisions of "Opening doors with func button"

From Valve Developer Community
Jump to: navigation, search
m (I proof-read it.)
m
 
Line 3: Line 3:
  
 
=Create the button=
 
=Create the button=
Create a [[func_button]] that will open the door(s). Add an output for OnPressed that will fire the Open (or Toggle) input on the doors. The buttons return time can be used with OnIn and OnOut to open and close the doors in that amount of time. Another way to toggle the doors with each press of the use key would be make your button itself a [func_door].
+
Create a [[func_button]] that will open the door(s). Add an output for OnPressed that will fire the Open (or Toggle) input on the doors. The buttons return time can be used with OnIn and OnOut to open and close the doors in that amount of time. Another way to toggle the doors with each press of the use key would be make your button itself a [[func_door]].
  
 
[[Category:IO System]]
 
[[Category:IO System]]

Latest revision as of 12:12, 18 April 2020

Create the door(s)

This will be the door that the button will open. A func_door, a prop_door_rotating, or a combination can be used. Just give the door a name, and maybe uncheck "use opens" so that players have to use the button. It might be a good idea to set the doors' auto-close time to never (-1).

Create the button

Create a func_button that will open the door(s). Add an output for OnPressed that will fire the Open (or Toggle) input on the doors. The buttons return time can be used with OnIn and OnOut to open and close the doors in that amount of time. Another way to toggle the doors with each press of the use key would be make your button itself a func_door.