Source SDK

Source SDK

TF2 - How to hang a lamp from a rope? (and have it move)
I was following a tutorial on the valve dev site, but realized it doesn't work. (the spring does, but not the rope) so the tutorial must exclude TF2's engine specifically... Is it possible to have a rope do this? If not, is there a hacky way to do it? I saw a mention of ball-sockets but the link was so old it no longer exists because it was on an old forum.

The rope stays where it's placed, and idk if logic_measure_movement can even move rope keyframes...
If Anyone has a link to a tutorial or simply knows a method, I would love to hear it!

https://vip1.qiannidekk.tk/sharedfiles/filedetails/?id=3731818471
< >
Näytetään 1-2 / 2 kommentista
It's been a while since I did anything like this but traditionally, you'd indeed do it by using a ball socket - its pivot (or whatever it's officially called) would be where the rope starts, its endpoint where the lamp is. Then for the rope, its start would be on the ceiling and the keyframe would be at the lamp and parented to the ball socket. The lamp would also have to be parented, of course.

There might be some other way to do it, but either way, rope physics in Source generally don't come from the ropes themselves. The ropes are purely visual, with the actual physics being handled by other entities.
Infinite_Data lähetti viestin:
It's been a while since I did anything like this but traditionally, you'd indeed do it by using a ball socket - its pivot (or whatever it's officially called) would be where the rope starts, its endpoint where the lamp is. Then for the rope, its start would be on the ceiling and the keyframe would be at the lamp and parented to the ball socket. The lamp would also have to be parented, of course.

There might be some other way to do it, but either way, rope physics in Source generally don't come from the ropes themselves. The ropes are purely visual, with the actual physics being handled by other entities.
Interesting... It stays where it is, but doesn't really "swing" like I wanted. I can use that for another section, but what I'm trying to do now is have the rope follow the lamp (which is already tied to a phys_spring entity). Right now the rope just stays hanging down where it is in the editor, even though it's parented to the lamp. CAN ropes move with items in TF2, or is it only other source games like CS, Portal, etc?

The idea is for the lamp to swing around a cave/hallway whenever it's shot (ideally moving a dynamic light_spot) and the rope to follow it. Unless I'm doing something wrong... the rope just stays still.

I should specify it's supposed to hang down quite a ways from the ceiling compared to normal lamps... that's why I need the rope to follow it, to give the illusion it's hanging from the rope.

However after a bit more testing I found something strange... simply turning the keyframe end of the rope into the prop and not attaching the lamp to anything but the rope makes it fall to the ground... but the rope follows it!... until it hits the ground, then it stops updating... why is this?
< >
Näytetään 1-2 / 2 kommentista
Sivua kohden: 1530 50