Door Button Question


(zim) #1

Hello again, I’ve made this button to open a door and everythings good but I’d only like the door to be accessible by the button. At the moment you can either open the door with the button or by running up to it and using f. Anyone know how I can fix this? I’ve already use search and I wasn’t able to find anything. :?


(murka) #2

replace the door with a script_mover and do faceangles in the script…
i can make a prefab if you want.


(Flippy) #3

Do a search for it, I already made a prefab for a door-button.
Or you could just look into scripting and the ‘faceangles’ command :slight_smile:


(zim) #4

That would be nice and I’d really appreciate it. Although I only want the door to be opened once.(dont thinki said that before) Also I’m sure I could take the prefab and learn from it too. :smiley:

I did a new search and found the thread for your prrefab but the link was dead. :frowning:


(Flippy) #5

Damn your right… I don’t have it anymore either :frowning:

I suppose I can make a new one if I find some time.


(murka) #6

i made one, it has a secret tile on the floor, once you step on it(or shoot) the door will open. link
ignore the map leaked, it is because the tile is touching the void, make a box around the map if it bothers.


(zim) #7

Thanks a ton Murka thats exactly what I was looking for. :smiley: Just one more question though. In the script how can I make the trigger unusable after its been used only once?


(murka) #8

trigger it again :slight_smile: just do “trigger door_1 open” and it opens again


(Flippy) #9

I think he means making it inactive after only one use.

There are multiple options how to do this.
You could use an accum value to check if it has been opened yet, or you could setstate the trigger invisible.


(carnage) #10

the easiest way would be instead of using a trigger_multiple just use a trigger_once then it can only be used once and doesnt require any extra scripting


(murka) #11

sry i read it too fast and i missed the “UN” part of UNuseable.
:stuck_out_tongue:


(Erik-Ftn) #12

Hi

I assume you have the entity update for whatever radiant version you have. If so you have this entity:

// --------------------- locking and unlocking doors --------------

/*QUAKED target_lock (1 1 0) (-8 -8 -8) (8 8 8)
Locks and unlocks func_door and func_door_rotating
-------- KEYS --------
“key” is the required key
key:0 unlocks the door
key:-1 locks the door until a target_lock with key:0
*/

If you think a bit you can build a button that unlocks a door, opens it and then locks it again. Build the door locked.

GL


(zim) #13

sorry for the late reply, but i’ve got everthing working the way i wanted it to.

to stop the door from being triggered again all i did was add “wait -1” to the button and it doesnt move back and let you activate it again. :smiley:

thanks again everyone for the help!!!