Page 1 of 1

Door! Help.

Posted: June 15th, 2007, 11:49 am
by oppdelta
Ok i cant find any tuts on doors. How do you make them open and that lot.

Little help please thank you.

Posted: June 15th, 2007, 1:15 pm
by Pedsdude
Create a brush, texture it, then right click on it and select function>door. This should open up the entities box (if not, press 'n') where you can choose which direction it moves in, whether it kills people who get in the way of it, etc.

If you want a door on a hinge as opposed to a door which moves to the side then say so and I'll be happy to explain how to do that too.

Posted: June 15th, 2007, 3:14 pm
by oppdelta
I would like the hinge way as well plz.

Posted: June 15th, 2007, 7:41 pm
by Nightmare
Why make this so complicated?
All you need to do is make a brush which will be the "door", in common look for the origin texture and make a new brush which will be the hinge of the door using the origin texture. Now select the origin brush and the door and right click on the 2d grid. Then select script/brushmodel. Press n to bring up the entities and then for key put in targetname and for value put in door. For the trigger, go to common and select the trigger texture. Make a brush using this texture where you want the button to be, right click on the brush in the 2d screen and select trigger/use. Then press n again and put in key: targetname and value: door_trig. Thats it for the mapping, now just use this simple script below and you are done.

Code: Select all

main() 
{
maps\mp\_load::main(); 
thread spin();
}

spin() 
{ 
door = getent("door","targetname");
trigger = getent ("door_trig","targetname");
while(1)
{
trigger waittill ("trigger");
door rotateyaw(90,2);
door waittill("rotatedone");
} 
}

Posted: June 16th, 2007, 12:17 am
by Drofder2004
Nightmare wrote:Why make this so complicated?
All you need to do is make a brush which will be the "door", in common look for the origin texture and make a new brush which will be the hinge of the door using the origin texture. Now select the origin brush and the door and right click on the 2d grid. Then select script/brushmodel. Press n to bring up the entities and then for key put in targetname and for value put in door. For the trigger, go to common and select the trigger texture. Make a brush using this texture where you want the button to be, right click on the brush in the 2d screen and select trigger/use. Then press n again and put in key: targetname and value: door_trig. Thats it for the mapping, now just use this simple script below and you are done.

Code: Select all

main() 
{
maps\mp\_load::main(); 
thread spin();
}

spin() 
{ 
door = getent("door","targetname");
trigger = getent ("door_trig","targetname");
while(1)
{
trigger waittill ("trigger");
door rotateyaw(90,2);
door waittill("rotatedone");
} 
}
Thats pretty much what was quoted above but without the exact details, but I must admit, looking back, that tutorial could've done with some sprucing up (i'm sure I made a better version in the stickies).

Posted: June 16th, 2007, 2:27 pm
by Pedsdude
If you don't want scripting, go with func>door_rotating, like I did in peds_parkour :roll:

As stated above, you also need a hinge (with common>origin texture). If you need help with it add me on xfire (pedsdude).

Posted: June 16th, 2007, 8:48 pm
by oppdelta
Ok i done a few attempts wit teh nonscriptign one. Im ok but how can i make the door slide up instead of rotate and slide across?

Posted: June 16th, 2007, 8:52 pm
by Nightmare
my little tutorial should come in handy. :)

http://codjumper.com/forums/viewtopic.php?t=2963

Posted: June 16th, 2007, 8:54 pm
by oppdelta
Thanks ill look at later right now i gotta go get food. XD