Conjoint Gaming [Game On]

CG Technical Area => Maps Area => Topic started by: Global_Meltdown on February 11, 2010, 07:25:30 AM

Title: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Global_Meltdown on February 11, 2010, 07:25:30 AM
Alright, I said I'd start making some Tutorials so why not start here.
---------------------------------------------------------------------------------------


Ok today we're going to learn how to do a physics (spring) hinged door.


I'll create a small square room with two lights in it.
(http://lh5.ggpht.com/_PmWAkmdxYkk/S3PEc5Vi9SI/AAAAAAAABL4/aQ8m13cG_gM/s640/Tut1.JPG)

Inside this test room I'm going to select the brush tool and make a post
or frame for my door to sit against.
(http://lh6.ggpht.com/_PmWAkmdxYkk/S3PEcM0uc5I/AAAAAAAABL0/LES9L2bXsUs/s640/Tut2.JPG)

Ok now depending on how many doors you want, depends on how many hinges you'll need
so for this example we'll place a double swinging door. To do that we'll select the right
post and right click and select "TIE TO ENTITY" Func_Brush to each one specifically. (NOT ALL TOGETHER LIKE THIS) or you'll have problems later on.
(http://lh3.ggpht.com/_PmWAkmdxYkk/S3PGCxs8AhI/AAAAAAAABOI/Wb_RFyat-5Y/s640/tut7.JPG)

Now name the left side something, I named mine FrameLeft.
(http://lh5.ggpht.com/_PmWAkmdxYkk/S3PGnJtVfyI/AAAAAAAABOs/l5HaUfp2t0w/s640/tut9.JPG)

Now name the right side something, I named mine FrameRight.
(http://lh5.ggpht.com/_PmWAkmdxYkk/S3PGwi5nktI/AAAAAAAABOw/Q8eh7_w7mKM/s640/tut10.JPG)

Now I'm going to place the doors. (When making your doors its a good idea to
make a space between the door and the frame for better performance)
(http://lh6.ggpht.com/_PmWAkmdxYkk/S3PE6KH631I/AAAAAAAABMs/pOGsxQp0SsM/s640/Tut3.JPG)

Now Select your doors one at a time.

First door to the left we'll right click and select "TIE TO ENTITY"
(http://lh3.ggpht.com/_PmWAkmdxYkk/S3PFGy-AikI/AAAAAAAABMw/73X3_iHfusQ/s640/tut4.JPG)

Now select Func_Physbox

Name your LEFT door whatever you want. I named mine "door1".
(http://lh6.ggpht.com/_PmWAkmdxYkk/S3PFnHru3lI/AAAAAAAABNo/tDQPn2Jj5uU/s640/tut5.JPG)

Do the same to the right side.

Right Click, select "TIE TO ENTITY"

Now select Func_physbox

Name your RIGHT door the same as the first except in numerical order to
keep it simple. So mine is door2.
(http://lh6.ggpht.com/_PmWAkmdxYkk/S3PFzxnzDWI/AAAAAAAABNs/T02EU_PsxJk/s640/tut6.JPG)

After that we'll select the entity tool and browse through the objects till
we find something called "PHYS_HINGE"
(http://lh5.ggpht.com/_PmWAkmdxYkk/S3PGjrETVgI/AAAAAAAABOo/wIHHzdrnfvY/s640/tut8.JPG)

Now place this at the center of the door to the left side.
(http://lh4.ggpht.com/_PmWAkmdxYkk/S3PHJHR82KI/AAAAAAAABPk/y5l_qAVNMjc/s640/tut11.JPG)

Now right click your "PHYS_HINGE" and select properties if the window isn't already
up, and edit a couple of lines:
(http://lh6.ggpht.com/_PmWAkmdxYkk/S3PHMhI0pNI/AAAAAAAABPo/_btCucXK6lk/s640/tut12.JPG)

Name: Hinge1
Entity 1: FrameLeft (This is your frame piece it's connected too)
Entity 2: Door1 (This is the door the PHYS_HINGE will be attached too)

Ok now lets take our selected "HINGE1" and drag the center ball to the top of the door.
(http://lh5.ggpht.com/_PmWAkmdxYkk/S3PH8oxbraI/AAAAAAAABQI/yhNyOP6UvRU/s640/tut15.JPG)

Ok Now we'll do the same for the other door
select the entity tool and browse through the objects till
we find something called "PHYS_HINGE" Now place this at the center of the door
to the right side.

Now right click your "PHYS_HINGE" and select properties if the window isn't already
up, and edit a couple of lines:

Name: Hinge2
Entity 1:FrameRight (This is your frame piece it's connected too)
Entity 2:Door2 (This is the door the PHYS_HINGE will be attached too)


Ok now lets take our selected "HINGE2" and drag the center ball to the top of the door.
(http://lh3.ggpht.com/_PmWAkmdxYkk/S3PITMSXepI/AAAAAAAABQk/n96Ph7iMUqk/s640/tut16.JPG)

Awesome so we have hinged doors, now comes the spring part. STAY WITH ME !

Go to your Entity Tool, browse through the objects till you get something called "PHYS_SPRING"
and place this in the center of the left door.
(http://lh3.ggpht.com/_PmWAkmdxYkk/S3PI4cxetBI/AAAAAAAABRE/FCRkY5OAXZg/s640/tut18.JPG)

Now were going to right click and select Properties if the window isn't up and edit a couple of lines

Name:Spring1 (What I named my Phys_Spring)
Entity 1:Door1 (Left Door)
Entity 2:Door2 (Right Door)
Spring Constant: 900 (This is the stiffness of the spring, play around with it to find what number suits you.)
exit this window (Always remember to hit Apply)

Now drag your ball across the left door to the center of the right door

IF your really motivated, you can set up individual springs for each door side, but this is a great start.

Now you should have something that looks like a room and a couple of doors.
Place your info_player_start or your spawn entity (I'm using ZPS for my example) So I'll place 1 Info_Player_Human
and 1 Info_Player_Zombie. (This is important if you want to explore your map)
(http://lh6.ggpht.com/_PmWAkmdxYkk/S3PHyet110I/AAAAAAAABQE/-uQ8p6shTtA/s640/tut13.JPG)

Now make sure you have no leaks or anything and hit F9. Shortly after a screen to compile your map should appear.

I select Normal for all, choose what you wish if you know the difference.

and click "OK"

A screen like this should appear and hopefully with no errors.
(http://lh4.ggpht.com/_PmWAkmdxYkk/S3PJ3y1Z00I/AAAAAAAABSE/W1jpkpnNPII/s640/tut14.JPG)

Either load up your map upon completion by going to your game and selecting create server
then select your map (Mine is saved as "PhysHingeTutorial" ) or set the run map when completed option after compiling.

If you've ever wondered how to test your map (ZPS specifically) open your developer console
using the "~" tilde key below the ESC button in the upper left of your
keyboard.

In the console type Sv_testmode 1 for THEN select F1 or F2 for human or zombie.
Type Kill in the console if your want to reselect.
Type Sv_cheats 1 then type NOCLIP to fly around your map if you wish.

I hope you enjoyed my tutorial, and if you did I'll look forward to making more.
If you have any questions email me. Youlostchris@gmail.com


(http://lh3.ggpht.com/_PmWAkmdxYkk/S3PKTVb6OpI/AAAAAAAABSk/66u7BD8DPBQ/s640/Tut19.jpg)

Here's the link to the Hammer/ZPS Map example that I made for this if you need more help.
http://www.filefront.com/15555665/SwingingDoors.rar (http://www.filefront.com/15555665/SwingingDoors.rar)

Please do not redistribute without credit + permission thanks :)
----------------------------------------------------------------------------------------------
Let me know what you guys think.
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Hollow on February 11, 2010, 12:41:48 PM
Wow..All that just to make a door..
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Tictactoe360 on February 12, 2010, 01:43:40 PM
Wow..All that just to make a door..

A swinging Door
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Global_Meltdown on February 12, 2010, 05:50:13 PM
a spring restrained swinging door :P  I know it seems difficult but once you start with the small stuff and work you way up it's not so bad.

Any suggestions for the next one?
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: JuNk^m@st3r on February 12, 2010, 07:16:50 PM
Nice Work :D tested it out, made it like u say and it worked out good, but the Springs are a pain in the ass, hard to find the right setting, sometimes the doors just don't stop swinging =P

But good one, easy to understand and do =D

Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Global_Meltdown on February 12, 2010, 08:57:02 PM
Cool :)

 Yeah the springs are kind of shitty, but you can adjust the friction on the door or the springs i believe to make it slower somehow. If you want i'll take another look later.
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: billynoggs cade master on September 07, 2010, 03:34:39 PM
seriously if any1 doesnt know how to a phys_hinge should be shot
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: JuNk^m@st3r on September 07, 2010, 04:10:18 PM
we had a first time for everything =P
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: vinnylord on September 07, 2010, 05:59:19 PM
seriously if any1 doesnt know how to a phys_hinge should be shot

SHOOT ME HONEY!!!
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Jorgen on September 07, 2010, 07:07:29 PM
go ahead shoot me 2 i forgot =D
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: billynoggs cade master on October 02, 2010, 12:57:47 PM
dumbasses will be shot and and survivors will be shot again.
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Wholegrain on October 03, 2010, 09:58:05 PM
and necromancers will be anally penetrated
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Dante on October 15, 2010, 04:59:07 PM
and necromancers will be anally penetrated
Necromancer here.
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Yahtzee on October 16, 2010, 01:00:08 PM
we need more of these
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: U MAD??? on November 27, 2010, 09:44:48 PM
what program are u using and if free link?
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: JuNk^m@st3r on November 28, 2010, 09:52:35 AM
if u look close on Pics, u can see its Hammer, the standart of Source SDK =)
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Finniespin on November 28, 2010, 10:42:50 AM
Pff... Source SDK.

Lets make some traps instead :D
Title: Re: Tutorial: SwingingDoors! - Medium Mapping Skills
Post by: Finniespin on March 26, 2011, 03:48:46 PM
what program are u using and if free link?
Source SDK.

Go to library> Tools

Install Source SDK

Its hard to find the Tools tab, try to google that. Can't explain it now.
SimplePortal 2.3.5 © 2008-2012, SimplePortal