Advanced Doors

Tutorial collection, comprehensive listings on main site.

Advanced Doors

Postby Tutorial on Mon Mar 07, 2005 1:06 am

category
General Half-Life 2/Entities

description
Put a door on hinges that will swing and be affected by physics.

keywords
doors, door, advanced, physics.

This tutorial is going to cover how to make physics enhanced doors, to get a good idea of what to expect check the trap-town Half Life 2 Bink video at the beginning when the combine metro cop bursts into the room, that’s what you are going to learn!

Step 1: Setting Up

Create a simple room, doesn’t matter about the size and then divide it with a Two walls, Tie these to the entity “func_brush” and name either of the two walls to “wall” the named brush will be what your door is attached too. Create a small gap in between the wall, this gap will be where your door will fit in. Try to keep the two walls as thin as possible, I will explain as to why you should do this later in the tutorial.

Image


HINT: A good way to judge a door size is to create a pro_ragdoll entity and set the world model to hostage1

Step 2: Creating the Door Brush

Now you are ready to make your door, to do this, firstly create a brush so that it touches one wall but with just a slight gap between the door and the second wall, we do this because if there is no gap then the door will collide with the wall at it’s apex of opening. (We can also reduce this happening by making the walls thin as instructed earlier so we can make the gap as small as possible).

Image


Now we will tie the door to the entity “func_physbox” the only necessary variable to change is the name, set that to “door”, now apply and move onto the next step

Image

Step 3: Securing the Door into Place

If you were to test your map now the door would just fall onto the floor, so now it’s time to introduce you to one of my favourite entities, Mr. Phys_Hinge. Select phys_hinge in the entity list and place them right between the wall and the door as show on the diagram

Image


Now its time to attach the door to the wall, to do this simply select both of the phys_hinge entities you have placed down and change the following parameters:

Entity 1: Wall
Entity 2: Door
Friction: 3

That should be all you need to change now simply throw in a few spawn points and compile the map and if all went well you will have a physically enhanced door!

Image Image


Step 4: Conclusion

Now that you know how to make a physics enhanced door you can add a lot more depth and scope for strategical gameplay on your maps. For example, you may want to have a pile of rubbish next to a door in a bombsite so you can push the rubbish in-front of the door giving the player on the other side of the door a much harder time of trying to get through it, giving you the opportunity to blast rounds into the door until the opponent is dead!

Example Map

Example Map

Wiggle987
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

phys_hinge

Postby Andromache on Mon Apr 11, 2005 7:24 pm

dude i tried your tutorial, but i cant seem to get the hinges to work, my door just falls to the ground everytime, i even copied your .vmf EXACTLY to my own and my door STILL falls to the ground each time i compile and run. i've tried so many different hinge placements and door sizes that im about to just say your full of shit and move on. but since im pretty sure your not, i need to know how the hell you got these god forsaken entities to work for you, please.. thanks.
Andromache
Dumpling
Dumpling
 
Joined: Mon Apr 11, 2005 7:20 pm

Postby zombie@computer on Mon Apr 11, 2005 7:42 pm

the tutorial also isnt the easiest way to create a door like that
simply

-create a phys_hinge
-with helpers on, move the helper to a point directly below the phys_hinge's origin. make sure the axis that is created (between the origin and the helper) is exactly along the z-axis and that its x-y location is suitable to hinge the door around

-enter the name of the door in the entity1 box of the phys_hinge
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

phys_hinge

Postby Andromache on Mon Apr 11, 2005 7:58 pm

wow thanks for the fast reply. but uh, at the risk of me sounding like a stupid noob (i am), wtf are helpers?
Andromache
Dumpling
Dumpling
 
Joined: Mon Apr 11, 2005 7:20 pm

phys_hinge

Postby Andromache on Mon Apr 11, 2005 8:07 pm

nevermind i got it figured out, thanks alot for the help, most appreciated.
Andromache
Dumpling
Dumpling
 
Joined: Mon Apr 11, 2005 7:20 pm

Postby Dead-Inside on Mon Apr 11, 2005 9:04 pm

Well I do have a question though.

1. Is there any way to make it act like a regular door until shot?
2. Can you make it close after being shot open... like.. a regular door?
User avatar
Dead-Inside
Veteran
Veteran
 
Joined: Wed Jan 05, 2005 4:15 pm
Location: Sweden (It's just as cold as you think it is)

Postby Deadman on Mon Apr 11, 2005 9:21 pm

Dead-Inside wrote:Well I do have a question though.

1. Is there any way to make it act like a regular door until shot?
2. Can you make it close after being shot open... like.. a regular door?


no to both
Image
Image

Woe Kitten wrote:I won't take a dump for less than 10 dollars :D

Unfortunately this has resulted in me being constipated and broke.
User avatar
Deadman
1337 p0st3r
1337 p0st3r
 
Joined: Sat Jan 15, 2005 2:17 pm

Postby Serever on Mon Apr 11, 2005 10:29 pm

shutup foo!

1) yes. easily, just tick the "start disabled" flag. when you shoot it it should become physicserized

2) maybe, with some tinkering.
"Hey Scott. It's Dougal. Can I have my hair from the 1980's back?"
User avatar
Serever
Senior Member
Senior Member
 
Joined: Tue Nov 23, 2004 9:23 pm
Location: NSW, Australia

Postby Deadman on Tue Apr 12, 2005 9:42 am

Serever wrote:shutup foo!

1) yes. easily, just tick the "start disabled" flag. when you shoot it it should become physicserized



start disabled and then, then you've got a normal brush not a door.......
Image
Image

Woe Kitten wrote:I won't take a dump for less than 10 dollars :D

Unfortunately this has resulted in me being constipated and broke.
User avatar
Deadman
1337 p0st3r
1337 p0st3r
 
Joined: Sat Jan 15, 2005 2:17 pm

Postby Serever on Tue Apr 12, 2005 12:29 pm

yes, it starts disabled, but when you shoot it (like i said) it enables.
"Hey Scott. It's Dougal. Can I have my hair from the 1980's back?"
User avatar
Serever
Senior Member
Senior Member
 
Joined: Tue Nov 23, 2004 9:23 pm
Location: NSW, Australia

Postby Dead-Inside on Tue Apr 12, 2005 2:11 pm

But a motion disables brush doesn't OPEN when you walk at it (Aka, function like a door).

So really that's not the answer to my question.

Because this isn't really that usefull unless it can still work like a door. It quickly becomes an annoyance rather than a feature.
User avatar
Dead-Inside
Veteran
Veteran
 
Joined: Wed Jan 05, 2005 4:15 pm
Location: Sweden (It's just as cold as you think it is)

Postby Serever on Tue Apr 12, 2005 2:29 pm

wait, i re read thw question. i thought he meant he wants it to act as a regular door WHEN shot. my bad :P
"Hey Scott. It's Dougal. Can I have my hair from the 1980's back?"
User avatar
Serever
Senior Member
Senior Member
 
Joined: Tue Nov 23, 2004 9:23 pm
Location: NSW, Australia

Postby lgCHICKEN on Wed Apr 20, 2005 7:58 pm

Deadman wrote:
Dead-Inside wrote:Well I do have a question though.

1. Is there any way to make it act like a regular door until shot?
2. Can you make it close after being shot open... like.. a regular door?


no to both

shutup foo!

1) parent a func_breakable with a nodraw texture to a func_door.
use the same method as wiggle mentioned... forgetting the fact that it is not a physbox... but a door.

make the output trigger a phys_convert
tell the phys_convert to change the door to a phys box.
you must also make the breakable tell the hinges to turn ON when the door becomes a physbox and tell the hinges to START OFF.

i managed to do it... i am working on another phys door tutorial but i guess i can make you an example map if you are really stuck.
lgCHICKEN
Dumpling
Dumpling
 
Joined: Wed Apr 20, 2005 7:04 pm

Postby JakeParlay on Fri Apr 22, 2005 4:31 am

i can't get the door to work... it just falls down when pushed on .... I tried what zombie said and played around with the helper and still no luck... any tips!?
User avatar
JakeParlay
Senior Member
Senior Member
 
Joined: Thu Dec 09, 2004 8:40 pm
Location: Oregon

Postby JakeParlay on Fri Apr 22, 2005 4:37 am

nevermind! got it!
User avatar
JakeParlay
Senior Member
Senior Member
 
Joined: Thu Dec 09, 2004 8:40 pm
Location: Oregon
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users