Advanced elevators

From Valve Developer Community

Jump to: navigation, search


Once you've created an elevator (see Two-stop elevators or Multi-stop elevators), there are several extra features that you could add to make it more realistic.

  • Doors that re-open when blocked
Simply tying an Open output to an OnBlocked input will not work, because the OnBlocked doesn't detect both phyics objects and the player. This can me remidied by parenting a Trigger_Multiple to the bottom of the elevator and adding the tigger value of the trigger_multiple to the Open output.
  • Counterweight
Use a func_physbox for the counterweight, constrained to the wall with a vertical phys_slideconstraint and attached to the elevator with a phys_pulleyconstraint. Remember to add the cables. Since there's more than one constraint, also use a phys_constraintsystem.
  • Multi-part sliding doors (one part slides into the other, while the other slides into the wall)
The simplest way to make a door like this would be to make the two brushes, or more, and set them in the door's closed position.

Move distance is defaulted to the size of the door in the direction it moves. Lip can be set to make the door stick out more or recede more, with negative values. It is critical to understand the above note so that you can get your door not only working, but working well. Let's start off: First you'll need your door (this includes parts of the door, all the doors together, etc.) Set it all up in its closed position. Tie them all, INDIVIDUALLY, to a func_door, and set their move direction in the same direction.

Now the tricky part. If your door pieces abutte eachother seamlessly, set a "Lip" value of all the door lengths ahead of it (the ones that recede before it). If you want the sections to stick out, increase each door's lip by a few inches.

If your door pieces are inside eachother and butt up against the wall, then move ahead on to the next part, provided you don't want any door-lip. If you do, you'll need to accrue each door's "Lip" by the previous one's; i.e. if you have one door sliding into another, and the other sticks out of the wall 4 inches, and the smaller one 2 inches out of that door, the lip on the smaller door should be 6 inches. THIS IS ONLY FOR DOOR-PIECES THAT TOUCH BOTH WALLS SIMULTANEOUSLY.

Now, imagine the speed you want your first door to move at, and set it. Set the next door, the one it recedes into, a little slower, and so on, and play with it until it looks good.


For other multipart doors, parenting and other tricks can be used. I strongly advise not using phys_* because they aren't as solid.

Personal tools
Namespaces
Variants
Actions