Door! Help.

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
User avatar
oppdelta
CJ Fan
CJ Fan
Posts: 107
Joined: June 3rd, 2007, 2:24 pm

Door! Help.

Post by oppdelta » June 15th, 2007, 11:49 am

Ok i cant find any tuts on doors. How do you make them open and that lot.

Little help please thank you.

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » June 15th, 2007, 1:15 pm

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.
Image
Image

User avatar
oppdelta
CJ Fan
CJ Fan
Posts: 107
Joined: June 3rd, 2007, 2:24 pm

Post by oppdelta » June 15th, 2007, 3:14 pm

I would like the hinge way as well plz.

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » June 15th, 2007, 7:41 pm

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");
} 
}
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » June 16th, 2007, 12:17 am

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).
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » June 16th, 2007, 2:27 pm

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).
Image
Image

User avatar
oppdelta
CJ Fan
CJ Fan
Posts: 107
Joined: June 3rd, 2007, 2:24 pm

Post by oppdelta » June 16th, 2007, 8:48 pm

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?

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » June 16th, 2007, 8:52 pm

my little tutorial should come in handy. :)

http://codjumper.com/forums/viewtopic.php?t=2963
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
oppdelta
CJ Fan
CJ Fan
Posts: 107
Joined: June 3rd, 2007, 2:24 pm

Post by oppdelta » June 16th, 2007, 8:54 pm

Thanks ill look at later right now i gotta go get food. XD

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests