I'm trying to make ragdolls attach to posts in the Source Hammer Editor for Half-Life 2. The outcome would be something like what is in the Sandtraps chapter, with the Combine guard used as a dummy:

This is the best I could find without going in-game. Image source:

I did some research a while ago, but what I tried (which I do not remember what it was) did not work. The problem I am facing at the moment is how to actually attach the ragdoll to the post.

EDIT 1: I have tried using phys_ragdollmagnet, but to no avail. I have also tried sticking a prop through the ragdoll and into the post, but that doesn't work either.

EDIT 2: I have figured out how to attach objects using phys_ragdollconstraint and phys_constraintsystem. Now the problem is, I can't get them to stop dancing! They keep jiggling even though I have disabled the collisions on the ragdolls.

  • We had a hanging ragdoll in one of our old maps. That might do the trick, if I can still find it... unfortunately it was like 10 years ago. – dly Jan 29 '18 at 10:14
  • @dly I had thought about using ropes and constraints like a noose (grim, I know), but I didn't want that. I have generally figured out how to attach ragdolls to objects, and I will post a detailed answer when I have time. – PlanetAlexanderProjects Jan 29 '18 at 10:20
  • I still have problems though (like ragdolls flying around the room), so I'll write something if nothing else pops up. – PlanetAlexanderProjects Jan 29 '18 at 21:26
  • If you have a good idea that works but has some other issues you could edit that into your question to maybe get some more specific help. – dly Jan 30 '18 at 7:04
  • For completeness' sake, I answered the original question. As to your 'current' problem: it might have to do with remnant information in your phys_constraintsystem, maybe try removing that? – Joachim Dec 4 '18 at 22:43

To attach a ragdoll to another object, you need two entities: a prop_ragdoll, and a phys_ragdollconstraint. The latter gives you the additional opportunity to attach the ragdoll to another nameable entity (used in cases where the ragdoll's parent is moving or can be moved, I presume), but this is optional.

  • Place the ragdoll (and its parent), and position the phys_ragdollconstraint as the point where the ragdoll is hanging from, like an imaginary nail.

  • Give the prop_ragdoll a unique name.

  • Go into the proporties of the phys_ragdollconstraint, and fill in the name of the ragdoll entity under 'Entity 1' (and that of the optional parenting entity under 'Entity 2').

enter image description here

  • Compile, and enjoy the show in-game.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.