Hey,
i made a little prefab yesterday about opening doors with a button (and a button only)
there are 4 types in there:
-
Pressing button opens the door and it stays open. Pressing button again closes the door.
-
Same as 1. But if you approach a closed door you get the ‘door is locked’ sound and icon.
-
Pressing button opens door, waits 3,5 seconds, then closes again.
-
Same as 3, but if you approach a closed door you get the ‘door is locked’ sound and icon.
The script is highly commented to show exaclty what does what and it should be easy to recreate…
Just a little side-note that i forgot to put in the readme:
if you want to copy a door from this map, you only need these things:
- the button on the left of the door you want
- the door (beware, in doors 2 and 4 there are actually 2 doors in eachother, make sure you get all of them)
- the target_script_trigger linked to the button
you do NOT need the big trigger brushes and the red entities, they are target_prints and inform you about which door does what…
EDIT:
OOPS completely forgot the link :banghead: :blah:
http://www.fragland.org/nick/scriptdoor_prefab.rar
there you go :moo:
Hope it helps you… (saw a few questions about it)
