Opening doors with func button

From Valve Developer Community
Jump to: navigation, search

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.