Physbox Trap

Tutorial collection, comprehensive listings on main site.

Physbox Trap

Postby Tutorial on Mon May 15, 2006 5:09 pm

category
General Half-Life 2/Entities

description
Setup a trap using physboxes.

keywords
physbox, trap, physics, func_physbox.

If you remember Ravenholm... the dark side of city 17 (Well I think) that place is fully of traps. Now I'll show you how to make a trap. (If you know how to do one... nice).

First Step!

Create a brush (Here I used a "wood" material), put it anywhere then transform it to a func_physbox and name it (I used "Wood" )no quotes.

Note: The entity "Func_physbox" works like a "prop_physics" but with a brush.

Now make a ceiling ... (We will use the ceiling to place some ropes; they will hold the physbox).
Place anywhere you want in the ceiling 2 move_rope.
Ok, now name them "trap_rope1" and "trap_rope2" (without the quotes)
Set their "Next KeyframeRope" key to "trap_rope1a" and "trap_rope2a".

Look:

Trap_rope1 -> trap_rope1a
Trap_rope2 -> trap_rope2a



Don't forget to place the keyframe_ropes one in the left side of the physbox and the other in the right side.
And place the move_rope near the keyframe_rope like in the scheme below.



R¹ R²
| |
| |
K¹ K²



Image

Now, put some barrels over the physbox as shown in the pic above.

If you run the map now, your "wooden plank" will fall with those barrels, but in this tutorial we don't want them to fall.

Step 2

Making the Ropes hold the Physbox


Put near the keyframe_rope (in both sides) an entity called phys_ragdollconstraint


Setting up the Phys_Ragdollconstraint

In the key entity1 put the name of your func_physbox and in the key entity2 put the name of your keyframe_rope.

Now, under the physbox ... create a func_breakable brush. Ajust it to fit the material of your choice.

Now run the map, get a gun and break the "physbox protection" ... you will see the barrels falling to ground but the "wooden plank" will be hold by the ropes.

Image

Image


Example map Here

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

Postby InternalRage on Mon May 15, 2006 6:34 pm

Nice tut, but instead of using the "trap protection" thing just tick the physbox on motion disabled, then "OnDamged" (i think) EnableMotion.
Damn ProZak is... sexy!
Image
User avatar
InternalRage
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Tue Jan 10, 2006 8:41 pm

Postby jacc0s on Mon Jul 17, 2006 11:32 pm

Bad tut.
Why?

I checked your example map and the physbox doesnt swing like real ropes, Why didnt you use phys_hinge instead ? :wink:
jacc0s
Member
Member
 
Joined: Sat Jul 23, 2005 5:54 pm

Postby Shadow801 on Sat Jul 22, 2006 8:34 pm

It's ok :-) But your right about the motion disabled stuff, Its what I use :P
User avatar
Shadow801
Regular
Regular
 
Joined: Thu Jan 05, 2006 5:19 pm
Location: Hastings, England

Return to Tutorials

Who is online

Users browsing this forum: No registered users