This tutorial will show you how to make a button that will in this case open/close a door.
This tutorial will show you how to make a button that will in this case open/close a door. Thanks to phb5000 for this tutorial.
Step 1) First of all you will need a simple map, a wall, a door, and a brush with a button texture.
Step 2) Name the button (func_button). (for example Button1)
Step 3) Change any button properties that you want to change. For example, Move Direction = The direction the button moves when it is pushed, Sound = The sound played when the button is pushed, ...
Step 4) Name the door (func_door). (for example Door1)
Step 5) Change any door properties that you want to change. For example, Move Direction, Sound... -Changing "Delay before reset" to -1 will cause it to not close by itself -The flags allow you to change it so that touching doesnt trigger the door, and other properties.
Step 6) Select the button and choose the "Outputs" tab. Click "Add". In the properties change "My output named" = "OnPressed", "Targets entities named" = "Door1", "Via this input" = "Toggle"
This means that when the button is pressed it will Toggle the state of the door. (if open it will close, and if closed it will open)