He means a normal door (like a func_door_rotating) which is locked. You cannot open it by walking up to it and using F.
However, there is a button, which will open the door. Once the door has closed again (I believe there’s a 4,5 second delay between open and close) it needs to be locked again.
There’s an entity called a ‘target_lock’ which must target the door. This entity can lock (‘key’ = 0) or unlock (‘key’ = -1) the door it is connected to. Activating this entity via script or via a func_button maybe will lock or unlock the door.
So this is the entity you are looking for. You need two of them, one to unlock the door and one to lock it again.
I’m not sure if this works but you can always try:
Create a ‘func_door_rotating’ and give it a ‘targetname’ of “door1” and a ‘key’ of “-1”.
Create two ‘target_lock’ entities, give one a ‘key’ of “-1” and a ‘targetname’ of “door1_lock” and the other one a ‘key’ of “0” with a ‘targetname’ of “door1_unlock”.
Give both ‘target_lock’ entities a ‘target’ of “door1”.
There should be two arrows pointing towards the door now.
Then, create a ‘func_button’ if you have it, or else a ‘func_invisible_user’.
Give it a ‘target’ of “door1_unlock”.
Give it a ‘delay’ of 5 seconds.
Create two ‘target_delay’ entities and make the ‘func_button’ target them both (arrow towards target_delays). Set the ‘wait’ key of nr1 to about 0.01 seconds. Set the ‘wait’ key of the other to about 5 seconds.
Have the first ‘target_delay’ (0,01s) entity target the door (func_door_rotating) and have the other target_delay (5s) target the ‘target_lock’ with targetname “door1_unlock”.
Again, not sure if this works, didn’t test it, just came up with this off the top of my head…
The logic behind it:
- Button unlocks the otherwise locked door.
- Button triggers a target_delay, which waits 0.01 seconds and then triggers the door to open.
- Button also triggered another target_delay, which waits 5 seconds (the door should have closed again by now) and locks the door again.
I can see quite an number of flaws here and also things that are probably not even neccesary… For example, I don’t know if you have to wait 0.01 s before actually opening the door. it might just work just aswell without the delay. I also don’t know if you need to wait for the door to close before locking it again. Hell, I don’t even know if you can open a door like this (by simply targetting it)!
Just try it and see what you can come up with. If this doesn’t work you’re probably best off trying to create a simple script for it… It’s really easy.