Post: Zipline Codes for COD GSC's
05-28-2011, 06:34 PM #1
Hawkin
Lord of the Undead
(adsbygoogle = window.adsbygoogle || []).push({}); Ok here it is My codes for Ziplines modified to work in any patch. This would also work in MW2 or WAW if you change the models, and effects.
You need to put this line in an onPlayerSpawned():
    self thread HntTxt();


Then foreach Zipline you want to spawn, you need a line like this.
    CrZip((-546, -1768, 586), (474, 1785, 592));
or simplified:
CrZip(Position1, Position2);


You can put this code below anywhere. (Any gsc that is linked to your main GSC with onplayerspawned.)

    HntTxt()
{ self endon("disconnect");
self endon("death");
self.zipz = 0;
self.HTxt = self createFontString( "objective", 1.5 );
self.HTxt setPoint( "CENTER", "CENTER" );
self thread DOnDZ(self.HTxt);
self.hint = "";
for(;Winky Winky
{
self.HTxt setText("" + self.hint);
self.hint = "";
wait .6;
}
}
DOnDZ(E)
{ self waittill("death");
E destroy();
}
CrZip(pos1, pos2)
{
pos = (pos1 + (0,0,110));
posa = (pos2 + (0,0,110));
zip = spawn("script_model", pos);
zip SetModel("vehicle_cobra_helicopter_d_piece07");
zang = VectorToAngles( pos2 - pos1 );
zip.angles = zang;
glow1 = SpawnFx(level.redcircle, pos1);
TriggerFX(glow1);
zip thread ZipAct(pos1, pos2);
zip2 = spawn("script_model", posa);
zip2 SetModel("vehicle_cobra_helicopter_d_piece07");
zang2 = VectorToAngles( pos1 - pos2 );
zip2.angles = zang2;
glow2 = SpawnFx(level.redcircle, pos2);
TriggerFX(glow2);
}
ZipAct(pos1, pos2)
{ self endon("disconnect");
line = self;
self.waitz = 0;
while(1)
{
for ( i = 0; i < level.players.size; i++ )
{ p = level.players[i];
if(Distance(pos1, p.origin) <= 50)
{ p.hint = "^5Hold [{+reload}] To Use ZipLine";
if(p.zipz == 0) p thread ZipMove(pos1, pos2, line);
}
if(Distance(pos2, p.origin) <= 50)
{ p.hint = "^5Hold [{+reload}] To Use ZipLine";
if(p.zipz == 0) p thread ZipMove(pos2, pos1, line);
}
}
wait 0.3;
}
}
ZipMove(pos1, pos2, line)
{ self endon("disconnect");
self endon("death");
self.zipz = 1;
dis = Distance(pos1, pos2);
time = (dis/900);
acc = 0.3;
if(time > 2.1) acc = 1;
if(time > 4) acc = 1.5;
if(time < 1.1) time = 1.1;
for(j = 0; j < 60; j++)
{
if( self UseButtonPressed())
{ wait 0.3;
if( self UseButtonPressed())
{ if(line.waitz == 1) break;
line.waitz = 1;
self thread zDeath(line);
if(isdefined(self.N)) self.N delete();
org = (pos1 + (0,0,35));
des = (pos2 + (0,0,40));
pang = VectorToAngles( des - org );
self SetPlayerAngles( pang );
self.N = spawn("script_origin", org);
self setOrigin(org);
self linkto(self.N);
self thread ZipDrop();
self.N MoveTo( des, time, acc, acc );
wait (time + 0.2);
self playsound("weap_suitcase_drop_plr");
self unlink();
if(self.team == "axis") self thread SpNorm(0.1, 1.7, 1);
line.waitz = 0;
self notify("ZIPCOMP");
self thread ZipStk(org);
wait 1;
break;
}
}
if(Distance(pos1, self.origin) > 70 && Distance(pos2, self.origin) > 70) break;
wait 0.1;
}
self.zipz = 0;
}
ZipStk(pos)
{ self endon("death");
posz = self.origin;
wait 3;
if(self.origin == posz) self SetOrigin(pos);
}
ZipDrop()
{ self endon("ZIPCOMP");
self endon("death");
self waittill( "night_vision_on" );
self unlink();
}
zDeath(line)
{ self endon("ZIPCOMP");
self waittill ("death");
line.waitz = 0;
}


You could get creative and make a simple tool that would Forge a Zipline in game. For A Challange lobby patch or whatever Something like this would work. Just call it from onplayerspawned with

    self thread ForgeZip();


Then put this with the other code above.
    ForgeZip()
{ self endon ("death")
j=0;
while(1)
{ if(self MeleeButtonPressed() && j == 0)
{ pos1 = self.origin;
j=1;
}
if(self FragButton Pressed() && j == 1)
{ pos2 = self.origin;
j=2;
}
if(j == 2)
{ level thread CrZip(pos1 , pos2);
j = 0;
wait 2;
}
wait .1;
}
}

This will spawn a zipline when you press the melee button on 1 spot and the frag button on a different spot. Those places will have a Zipline now. You can change the buttons and you might want to make it so it only happens when you are prone or something, but you get the idea.

Enjoy.

The following 7 users say thank you to Hawkin for this useful post:

BlazingDope, Correy, CrEaTiiOn_BuRn, DarKMaGiiC, GetDeleted -_-, juddylovespizza, x-Roniie-x.
05-28-2011, 06:36 PM #2
juddylovespizza
I'VE GOT JUNGLE FEVER
whats it like?
05-28-2011, 06:41 PM #3
redraiderark
Are you high?
Nice. I love your COD4 ZL and hope you can make a new MW2 one or WaW. You give us the codes but you are the only one good enough to make a good one.
05-28-2011, 06:46 PM #4
Hawkin
Lord of the Undead
Originally posted by juddylovespizza View Post
whats it like?


Sorry, I though you played COD4 Zombieland with me before. Maybe it was before I added the ziplines. There is a video of the ziplines in the link below. It's cool and fun especially if the 2 ends are far apart.

You must login or register to view this content.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo