Opening doors with func button

From Valve Developer Community
Revision as of 08:43, 28 March 2020 by BitMage (talk | contribs) (Basic version. Saw the red link.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Opening doors with func_button

Create the door(s)

This will the door that the button will open. A [func_door], a [prop_door_rotatating], 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) output 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].