Why doesn't someone make a vmf for
@Corfix to look at and study? I would totally do it right now but I am a bit busy and afk.
It's a bit late, but since he's a beginner, this may still help him.
Included is a VMF with 4 doors. Three are shown here (I'll get to the 4th one later)
Door1 will open once you hit the button and it will automatically close after 3 seconds.
Door2 will open once you hit the button if it is closed and it will close once you hit the button if it is open.
Door3 will open once you hit the green button and close once you hit the red button.
For the hammer part:
The button is set to open door1 when it is damaged (hit by a player)
The door has a delay of 3, so it will close after 3 seconds of being opened.
The other doors have a delay of -1, so those doors will never do anything by themselves.
The button here will "toggle" door2, so it will set the door in the opposite position of what it's in.
For example, if it is open the button will close it and if it is closed the button will open it.
This door has 2 buttons. One that opens it (green ones) and one that closes it (red one).
Finally, we move on to #4, which is slightly more advanced.
Door 4 does the same thing as Door 2, except it lets the user use the +use command (which is disabled by default anyway).
We have "Damage Activates" Checked and use OnPressed instead of OnDamaged since damage will activate it, but so will +use.
To use the command, you first must enable it in console with
and then bind it to a key. EX:
See the video for a better understanding.
Cheers!