Page 1 of 1
					
				Zip line Problem
				Posted: August 22nd, 2007, 7:24 pm
				by Soviet
				I've got a weird issue with my zip line. The first time anyone attempts to go down it the handles travel almost horizontally away from the start (as opposed to the intended 45 degree angle) and your character gets stuck in the line. After that first try the handles don't come back,  but you slide down exactly how you should. Does anyone know whats wrong?
Code: Select all
zipline()
{
svt_zip = getent ("svt_zip","targetname"); //The handles
svt_zip_trig = getent ("svt_zip_trig","targetname"); 
org_start = (1382,2698,1206); //I set this to where the handles are
while (1)
{
svt_zip_trig waittill ("trigger",user);
user setOrigin( (1382,2698,1136) ); //That is right below the handles
user linkto(svt_zip);
svt_zip moveto((1382, 4228, -326), 6, 4, 2); //That is where i want the handles to end up in coordinates
svt_zip waittill ("movedone");
wait 0.5;
user unlink();
svt_zip moveto((org_start), 6, 4, 2);
svt_zip waittill ("movedone");
wait 1;
}
}
 
			
					
				
				Posted: August 22nd, 2007, 8:01 pm
				by Luke
				Didn't you get this working in cod 1? 
viewtopic.php?t=4057 
			
					
				
				Posted: August 22nd, 2007, 9:05 pm
				by Soviet
				didn't end up ever using it, thats what i used as the basis for this one though. This zip line is my first attempt at it
			 
			
					
				
				Posted: August 23rd, 2007, 2:33 am
				by Nightmare
				Code: Select all
zipline()
{
svt_zip = getent ("svt_zip","targetname"); //The handles
svt_zip_trig = getent ("svt_zip_trig","targetname");
while (1)
{
svt_zip_trig waittill ("trigger",user);
user setOrigin( (1382,2698,1136) ); //That is right below the handles
user linkto(svt_zip);
svt_zip moveto((1382, 4228, -326), 6, 4, 2); //That is where i want the handles to end up in coordinates
svt_zip waittill ("movedone");
wait 0.5;
user unlink();
svt_zip moveto((1382,2698,1206), 6, 4, 2);
svt_zip waittill ("movedone");
wait 1;
}
}
Try this, I am pretty sure that will fix the problem about the zipline not going back.
 
			
					
				
				Posted: August 23rd, 2007, 2:36 am
				by Nightmare
				0,0,0 is not their starting origin, thats just a location on a map, unless you define it in the map and in the entities.
			 
			
					
				
				Posted: August 23rd, 2007, 3:32 am
				by Pedsdude
				KillerSam 1 - 0 Nightmare
			 
			
					
				
				Posted: August 23rd, 2007, 3:53 am
				by Soviet
				*screenshots and frames*
thanks ks, it worked.
			 
			
					
				
				Posted: August 23rd, 2007, 10:32 am
				by Luke
				KillerSam wrote:But he is using moveto - so the starting position of the entity becomes 0,0,0 (its origin).
That is if the entity doesn't have a real origin, if you were to give it an origin brush and try that, it would end up at 0,0,0 of the map, not where it started.
It will still work that way though.
 
			
					
				
				Posted: August 24th, 2007, 5:18 pm
				by Drofder2004
				Pedsdude wrote:KillerSam 1 - 0 Nightmare
I think you will find...
KillerSam 0 - 1 Nightmare
As Luke pointed out, if an entity is given an origin (which all players have) then the origin is their origin, not (0,0,0). 
Anything with a set origin, can be moved to an exact location/coordinate
 
			
					
				
				Posted: August 24th, 2007, 5:22 pm
				by Drofder2004
				KillerSam wrote:My code worked - Nightmares would not work.
Then your mapping was wrong 

.
Did you give your zip line an "origin" brush?
 
			
					
				
				Posted: August 24th, 2007, 5:48 pm
				by Soviet
				no, technically it is not wrong if it works properly though, it is just another method of achieving the desired effect.
			 
			
					
				
				Posted: August 24th, 2007, 5:57 pm
				by Pedsdude
				There is no wrong answer
*philosphical mode OFF*