cs:s rope problem
Post Reply
Quote
Re: cs:s rope problem
Posted by sixsixtysix on Tue Jan 25th at 1:24am 2005


so, i'm having a problem with ropes in cs:s. i've done the rope bridge before, and it worked great. that was for a hl2dm map. in cs:s, my keyframe_rope ends up going to the origin of the world (0,0,0), even though its parent is whatever object i want to hang, be it func_physbox or or prop_physics_override. my phys_lengthconstraint is working fine. is there hope for my rope? any help appreciated.
*sixsixtysix*




Quote
Re: cs:s rope problem
Posted by DrGlass on Tue Jan 25th at 1:27am 2005


make the physbox the next point for the rope to go, i.e. move_rope next tartget (physbox name).
[addsig]




Quote
Re: cs:s rope problem
Posted by sixsixtysix on Tue Jan 25th at 2:37am 2005


that doesn't seem to work.





Quote
Re: cs:s rope problem
Posted by DrGlass on Tue Jan 25th at 3:48am 2005


Then try a move_rop > keyframe_rope > phys_constraint > Physbox
[addsig]




Quote
Re: cs:s rope problem
Posted by uberDingo on Tue Jan 25th at 5:44am 2005


I know CS has very limited physics entities due to trying to save bandwidth. I screwed around with ropes a lot and could get anything to work except a simple point A to point B rope (like a "hanging" ragdoll... and I use the term hanging very loosely heh) I dont think you can use constraints and the like... but please prove me wrong

I dont think you can use the phys_constraints or box ...





Quote
Re: cs:s rope problem
Posted by sixsixtysix on Tue Jan 25th at 6:16am 2005


? quoting DrGlass
Then try a move_rop > keyframe_rope > phys_constraint > Physbox

again, not working.

i fixed the map(changd entites) for it to work in hl2dm, and it works fine, as i knew it would. i've tried everything i can think of, even starting from scratch. the problem is this:

in cs:s when you set a keyframe_rope's parent to any other entity, it gets rendered to 0,0,0.

i know cs:s's ladder implementaion is different than hl2dm's, so i guess the ropes are different, too.

*sixsixtysix*





Quote
Re: cs:s rope problem
Posted by sixsixtysix on Tue Jan 25th at 6:19am 2005


the constraints and physbox DO work. [snagglepuss]quite well, even.[/snagglepuss] it's the ropes that are on dope.

*sixsixtysix*





Quote
Re: cs:s rope problem
Posted by Rof on Tue Jan 25th at 6:57am 2005


You can work around it using logic_measure_movement, and one of the few entities in CS:S that do work when parented to an object. I used a non-activated env_spark, but there are probably others. The obvious ones like info_target don't work. (The env_spark doesn't produce any sparks, it's just a handy marker).

You can download an example .vmf here.

Essentially, you use a logic_measure_movement to measure the position of the env_spark (parented to the corner of a func_physbox) relative to one end of a rope.
It then sets the postion of the other end of the rope to the same place.

This gives somewhat laggier movement of the rope than the proper way of doing it (which only works in HL2 & DM), but it's the only way I found of doing it in CS:S.
[addsig]




Quote
Re: cs:s rope problem
Posted by sixsixtysix on Wed Jan 26th at 1:03am 2005


Thanks a million, Rof! You rule!

I made a tutorial for this in the hlaflife2 knowledge base.

http://www.hl2world.com/wiki/index.php/Rope_Workaround_in_Counterstrike:_Source





Quote
Re: cs:s rope problem
Posted by Leperous on Wed Jan 26th at 1:16am 2005


*cough* Feel free to write something similar here, or at least mark his answer as correct?



Quote
Re: cs:s rope problem
Posted by sixsixtysix on Wed Jan 26th at 2:45am 2005


Rope Workaround for CS:S
by sixsixtysix with thanks to Rof


Introduction:
This tutorial will allow you hang entities from ropes.It is is a workaround for a known rope issue is Counter-Strike: Source. The issue being that you can't give a keyframe_rope a parent or else it will go to the map's origin (0,0,0) in-game.

The entities that we'll be using:
A. move_rope

B. keyframe_rope

C. phys_lengthconstraint

D. env_spark

E. func_physbox or prop_physics_override (for this we'll use a physbox)

F. logic_measure_movement

Placing the entities:
A. Place the func_physbox wherever you'd like it to be hanging from.

B. Place the move_rope wherever you'd like your rope to start from.

C. Place the keyframe_rope just inside the object you're hanging.

D. Place the phys_lengthconstraint in the same place as the keyframe_rope. Select and drag the small white circle to the move_rope's position.

E. Place the env_spark in the same place as well.

F. Place the logic_measure_movement off to the side for easy access in the editor.

Naming the entities:
A. It's best if you give all the entities related names. For this tutorial, we'll use "box".

B. Fill in your names like this: func_physbox = box, move_rope = box_rope, keyframe_rope = box_rope_keyframe, and env_spark = box_spark (no need to name the phys_lengthconstraint unless you're using a phys_constraintsystem or somesuch).


Filling in the entities' information:
A. Set move_rope's Next KeyFrame to box_rope_keyframe.

B. Set env_spark's Parent to box.

C. Set phys_lengthconstraint's Entity 1 to box.

D. Set logic_measure_movement's Entity to Measure to box_spark, Measure Reference to box_rope, Entity to Move to box_rope_keyframe, and Movement Reference to box_rope.


Final words:

Well, there you go. You should now be able to hang a func_physbox or prop_physics_override from a rope and have them both moving around in Counter-Strike: Source.

*sixsixtysix*





Quote
Re: cs:s rope problem
Posted by uberDingo on Wed Jan 26th at 3:56pm 2005


has anyone tested how this actually effects multiplayer games? my concern is that they (valve) removed the physics entities needed to do this because of network lag generated by some of the physics. I'm guessing that valve overlooked this method to get around the weakened physics engine for network play and incorporating it may make your map lag really bad when you have a bunch of people playing at once.

pretty sweet hack though






Post Reply