Pick up the crowbar of research scientist Gordon Freeman, who finds himself on an alien-infested Earth being picked to the bone, its resources depleted, its populace dwindling. Freeman is thrust into the unenviable role of rescuing the world from the wrong he unleashed back at Black Mesa. And a lot of people, people he cares about, are counting on him.

Post tutorial Report RSS Swinging Doors Tutorial (HL2:ZPS Config)

Alright, I said I'd start making some Tutorials so why not start here. The game used is Hl2, the mod used is Zombie Panic Source!.

Posted by on - Basic Mapping/Technical

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.

Inside this test room I'm going to select the brush tool and make a post
or frame for my door to sit against.

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.

Now name the left side something, I named mine FrameLeft.

Now name the right side something, I named mine FrameRight.

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)

Now Select your doors one at a time.

First door to the left we'll right click and select "TIE TO ENTITY"

Now select Func_Physbox

Name your LEFT door whatever you want. I named mine "door1".

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.

After that we'll 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 left side.

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

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.

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.

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.

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)

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.

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

Will update with an example link soon!

Comments
Kobra299
Kobra299

Small Thing the Link does not work

Reply Good karma Bad karma+3 votes
Global_Meltdown Author
Global_Meltdown

Thanks for that Kobra. By the way I wanted to talk to you about some ideas either way. I remember you were trying to contact me a few years back and I do apologize for being unreachable.

Reply Good karma+2 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Half-Life 2
Platforms
Windows, X360, XBOX, PS3
Developer & Publisher
Valve
Engine
Source
Contact
Send Message
Homepage
Half-life2.com
Release date
Game watch
Follow
Purchase
Tutorial
Related Games
Half-Life 2
Half-Life 2 First Person Shooter
Half-Life 2: Episode One
Half-Life 2: Episode One First Person Shooter
Half-Life 2: Episode Two
Half-Life 2: Episode Two First Person Shooter
Related Engines
Source
Source Commercial
Related Groups
Valve
Valve Developer & Publisher