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²
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.
Example map Here
Darklight