cs:s rope problem

cs:s rope problem

Re: cs:s rope problem Posted by sixsixtysix on Tue Jan 25th 2005 at 1:24am
sixsixtysix
7 posts
Posted 2005-01-25 1:24am
7 posts 1 snarkmarks Registered: Jan 23rd 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
Re: cs:s rope problem Posted by DrGlass on Tue Jan 25th 2005 at 1:27am
DrGlass
1825 posts
Posted 2005-01-25 1:27am
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
make the physbox the next point for the rope to go, i.e. move_rope next tartget (physbox name).
Re: cs:s rope problem Posted by sixsixtysix on Tue Jan 25th 2005 at 2:37am
sixsixtysix
7 posts
Posted 2005-01-25 2:37am
7 posts 1 snarkmarks Registered: Jan 23rd 2005
that doesn't seem to work.
Re: cs:s rope problem Posted by DrGlass on Tue Jan 25th 2005 at 3:48am
DrGlass
1825 posts
Posted 2005-01-25 3:48am
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
Then try a move_rop > keyframe_rope > phys_constraint > Physbox
Re: cs:s rope problem Posted by uberDingo on Tue Jan 25th 2005 at 5:44am
uberDingo
72 posts
Posted 2005-01-25 5:44am
72 posts 17 snarkmarks Registered: Dec 21st 2004
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 :sad:

I dont think you can use the phys_constraints or box ...
Re: cs:s rope problem Posted by sixsixtysix on Tue Jan 25th 2005 at 6:16am
sixsixtysix
7 posts
Posted 2005-01-25 6:16am
7 posts 1 snarkmarks Registered: Jan 23rd 2005
<DIV class=quote>
<DIV class=quotetitle>? quoting DrGlass</DIV>
<DIV class=quotetext>Then try a move_rop > keyframe_rope > phys_constraint > Physbox
</DIV></DIV>
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
Re: cs:s rope problem Posted by sixsixtysix on Tue Jan 25th 2005 at 6:19am
sixsixtysix
7 posts
Posted 2005-01-25 6:19am
7 posts 1 snarkmarks Registered: Jan 23rd 2005
the constraints and physbox DO work. [snagglepuss]quite well, even.[/snagglepuss] it's the ropes that are on dope.

sixsixtysix
Re: cs:s rope problem Posted by Rof on Tue Jan 25th 2005 at 6:57am
Rof
210 posts
Posted 2005-01-25 6:57am
Rof
member
210 posts 41 snarkmarks Registered: Dec 3rd 2004
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.
Re: cs:s rope problem Posted by sixsixtysix on Wed Jan 26th 2005 at 1:03am
sixsixtysix
7 posts
Posted 2005-01-26 1:03am
7 posts 1 snarkmarks Registered: Jan 23rd 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
Re: cs:s rope problem Posted by Leperous on Wed Jan 26th 2005 at 1:16am
Leperous
3382 posts
Posted 2005-01-26 1:16am
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
cough Feel free to write something similar here, or at least mark his answer as correct? :razz:
Re: cs:s rope problem Posted by sixsixtysix on Wed Jan 26th 2005 at 2:45am
sixsixtysix
7 posts
Posted 2005-01-26 2:45am
7 posts 1 snarkmarks Registered: Jan 23rd 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
Re: cs:s rope problem Posted by uberDingo on Wed Jan 26th 2005 at 3:56pm
uberDingo
72 posts
Posted 2005-01-26 3:56pm
72 posts 17 snarkmarks Registered: Dec 21st 2004
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 :smile: