Page 1 of 1

Zip Line?

Posted: October 4th, 2006, 6:40 am
by Soviet
would it be possible to make a zip line where if you walk up and press use you slide on a rope down to some other place?

Posted: October 4th, 2006, 11:30 am
by Luke
Yes, i've got one in one of the maps i'm working on. So to answer your question, yes it is possible.

Posted: October 4th, 2006, 2:30 pm
by Drofder2004
And also fairly easy.

If Luke has it in his map, I will leave it up to luke to either give away his code or wait until the release of his map...

Posted: October 4th, 2006, 3:35 pm
by Luke
The way i did it is pretty easy, and the code is already on the forum, just not for this purpose. This is the code i used, which is basically just using moveto and linkto:

Code: Select all

zipwire()
{
zipwire = getent ("zipwire","targetname"); //zipwire is the handle, this will be moving along the wire
ziptrig = getent ("ziptrig","targetname");  
org_start = (1304,2673,1186);
while (1)
{
ziptrig waittill ("trigger",user);
user.origin = zipwire.origin - (0,0,120);
user linkto(zipwire);
zipwire moveto((1304, 1878, 1567), 6, 4, 2);
zipwire waittill ("movedone");
wait 0.5;
user unlink();
zipwire moveto((org_start), 6, 4, 2);
zipwire waittill ("movedone");
wait 1;
}
}
Simple but works fairly well, i'm sure you can change the values for it to work in your map soviet, but if you need help just ask. Drofder might have a better method though :P

Posted: October 4th, 2006, 5:21 pm
by Soviet
awesome, ty luke

Posted: October 4th, 2006, 7:44 pm
by Drofder2004
Luke wrote:The way i did it is pretty easy, and the code is already on the forum, just not for this purpose. This is the code i used, which is basically just using moveto and linkto:

Code: Select all

zipwire()
{
zipwire = getent ("zipwire","targetname"); //zipwire is the handle, this will be moving along the wire
ziptrig = getent ("ziptrig","targetname");  
org_start = (1304,2673,1186);
while (1)
{
ziptrig waittill ("trigger",user);
user.origin = zipwire.origin - (0,0,120);
user linkto(zipwire);
zipwire moveto((1304, 1878, 1567), 6, 4, 2);
zipwire waittill ("movedone");
wait 0.5;
user unlink();
zipwire moveto((org_start), 6, 4, 2);
zipwire waittill ("movedone");
wait 1;
}
}
Simple but works fairly well, i'm sure you can change the values for it to work in your map soviet, but if you need help just ask. Drofder might have a better method though :P
Thats the basic single zipwire and if you only want to use one zipwire, this is the simplest method.