Zip line Problem

Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Zip line Problem

Post by Soviet » August 22nd, 2007, 7:24 pm

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;
}
}
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » August 22nd, 2007, 8:01 pm

Didn't you get this working in cod 1? viewtopic.php?t=4057
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Post by Soviet » August 22nd, 2007, 9:05 pm

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
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » August 23rd, 2007, 2:33 am

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.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » August 23rd, 2007, 2:36 am

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.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » August 23rd, 2007, 3:32 am

KillerSam 1 - 0 Nightmare
Image
Image

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Post by Soviet » August 23rd, 2007, 3:53 am

*screenshots and frames*

thanks ks, it worked.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » August 23rd, 2007, 10:32 am

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.
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » August 24th, 2007, 5:18 pm

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
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » August 24th, 2007, 5:22 pm

KillerSam wrote:My code worked - Nightmares would not work.
Then your mapping was wrong ;).

Did you give your zip line an "origin" brush?
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Post by Soviet » August 24th, 2007, 5:48 pm

no, technically it is not wrong if it works properly though, it is just another method of achieving the desired effect.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » August 24th, 2007, 5:57 pm

There is no wrong answer

*philosphical mode OFF*
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests