Page 1 of 1
Sliding door to be opened on one side only - please help?
Posted: Wed Dec 31, 2003 5:07 pm
by Sparky
Hi
I have made a good sliding door for a machine gun "loop hole" - which you can look out / fire from the main bunker room and into the bunker entrance. i.e. for defence.
The door works fine, but i can not work out the following and any help would be appreciated:
I want the door to open from one side only, using the enter button and to the following;
The defender in the bunker can only open the door from that side.
The attacker in the entrance can not open the door.
At the moment the way i have got it set up is that it can be opened from both sides of the wall by presing the enter button - but i want it to do the above?
Is this possible?
Thanks
Happy new year to all!
Posted: Wed Dec 31, 2003 6:53 pm
by Shortricci
I believe it can be done.
You can set a door so that it can only be open from one side, so with a little scripting you should be able to set it to be opened by defending forces. But I have no idea how, so someone might reply with an answer
- Ricci

Targeted
Posted: Wed Dec 31, 2003 8:59 pm
by tltrude
You will have to set the door as "targeted", give it a targetname, and place a trigger_use brush near it. The trigger_use must target the door and have an angle set.
"angle" if set, the trigger will only fire when someone is facing the direction of the angle.
I'm not sure if setting an angle will work for the trigger_use, but it is worth a try. You may also want to set the "toggle" spawnflag for the door--so it wont close by itself.
Posted: Sat Jan 03, 2004 7:51 pm
by Sparky
Hi,
Thanks for the reply,
I have been away for a few days - so i will try your idea sometime later on and let you know how it works out......
Cheers.
Posted: Fri Jan 16, 2004 11:52 pm
by Sparky
Thanks for your help (sorry for taking ages to reply),
I managed to get the door working as intended now.....
In the end i just used a trigger on the side that i wanted it to open only;
I gave the func_door values of 270 for direction and checked the box's for targeted and toggle - which allowed me to open and close the door as many times as i liked!
For some reason my original problem of opening the door on both sides was due to the trigger brush being to big - which allowed the player to reach it both sides of the wall. So to overcome this i made the trigger brush smaller and set it back form the wall / door a littte..and now it works!
Q. The room that has the trigger in it seems to be able to be activated from further away than anticipated regardless of the brush size? so is there a key value that you can set to reduce its working radius or zone?
cheers
Posted: Sat Jan 17, 2004 12:14 am
by crunch
Sparky wrote:
Q. The room that has the trigger in it seems to be able to be activated from further away than anticipated regardless of the brush size? so is there a key value that you can set to reduce its working radius or zone?
The only way I know to do this is to give the trigger a k/v of cone/5.
This would mean the trigger cannot be used unless the player was directly in front of it. Your value of 5 sets a 10 degree "cone" perpendicular to the trigger face in which the player would have to be to fire it.
Posted: Sat Jan 17, 2004 4:09 pm
by Sparky
Hi
I put in those values as suggested and now it works much better.
Thanks for the help,
Sparky