Post: [Release] SAM Turret
06-17-2012, 11:35 AM #1
KingcreekS
NOTHING IS IMPOSSIBL
(adsbygoogle = window.adsbygoogle || []).push({}); This is a code i been working for like 1 week and i decide to share it with us. This is my first code and im very happy for it , i have to thanks the following people :

@247Yamato- For his awesomes tutorials.
@SatanicAmerican- For his Killstreak Notify.
@IELIITEMODZX- For teaching me the triggers and all that.


THE CODE:

    
SamTurret()
{
self endon ( "disconnect" );
self endon ( "death" );
self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
self.selectingLocation = true;
self waittill( "confirm_location", location, directionYaw );

NapalmLoc = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
NapalmLoc += (0, 0, 400);
self endLocationSelection();
self.selectingLocation = undefined;
self thread killstreakNotify(self.name,"SAM TURRET IN COMING");
Plane = spawn("script_model", NapalmLoc+(-15000, 0, 5000) );
Plane setModel( "vehicle_ac130_low_mp" );
Plane.angles = (45, 119.004, 0);
Plane playLoopSound( "veh_ac130_dist_loop" );
Plane moveTo( NapalmLoc + (15000, 0, 2500), 10);
wait 15;
bomb = spawn("script_model", Plane.origin );
bomb setModel( "projectile_hellfire_missile" );
bomb.angles = self.origin;
wait 1.6;
TurretBox= spawn("script_model",bomb.origin-(0,0,0) );
TurretBox setModel("com_plasticcase_beige_big");
TurretBox.angles=bomb.angles;
wait 2;
self playsound("capture_a");
TurretBox moveto(bomb.origin+(0,0,90),2);
wait 1.5;
sky = VectorToAngles( (self.origin+(0,0,500)) - (self.origin ));
self playsound("capture_c");
self rotateto(sky, 2);
wait 5;
for(;Winky Winky
{
self playsound("weap_cobra_missile_fire");
self rotateYaw(360,4);
wait 4;
self rotateYaw(-360,4);
wait 4;
self thread SamFireSetup();
}
}
SamFireSetup()
{
self endon("chopper_down");
self endon("disconnect");
team = owner.pers["team"];
for(;Winky Winky
{
if( (level.teambased) && (isDefined(level.chopper)) && (level.chopper.team !=team))
{
self thread SamFire();
self notify("chopper_down");
}
}
}
SamFire()
{
self iPrintlnBold("Now wait to an helicopter come");
targets = GetTargetList();
targetsInReticle = [];
foreach ( target in targets )
{
if ( !isDefined( target ) )
continue;
if ( bulletTracePassed( self.origin, target.origin, false, self ) )
targetsInReticle[targetsInReticle.size] = target;
}
sortedTargets = SortByDistance( targetsInReticle, self.origin );
self.stingerTarget = sortedTargets[0];
rocket = MagicBullet( "stinger_mp", self.origin, self.stingerTarget.origin, self );
rocket Missile_SetTargetEnt( self.stingerTarget );
rocket Missile_SetFlightmodeDirect();
}

GetTargetList()
{
targets = [];
if ( level.teamBased )
{
if ( IsDefined( level.chopper ) && ( level.chopper.team != self.team || level.chopper.owner == self ) )
targets[targets.size] = level.chopper;
if ( isDefined( level.ac130player ) && level.ac130player.team != self.team )
targets[targets.size] = level.ac130.planemodel;
if ( isDefined( level.harriers) )
{
foreach( harrier in level.harriers )
{
if ( isDefined( harrier ) && ( harrier.team != self.team || ( isDefined( harrier.owner ) && harrier.owner == self ) ) )
targets[targets.size] = harrier;
}
}
if ( level.UAVModels[level.otherTeam[self.team]].size )
{
foreach ( UAV in level.UAVModels[level.otherTeam[self.team]] )
targets[targets.size] = UAV;
}
if ( isDefined( level.littleBird ) )
{
foreach ( bird in level.littleBird )
{
if ( !isDefined( bird ) )
continue;
if ( self.team != bird.owner.team || self == bird.owner )
targets[targets.size] = bird;
}
}
}
else
{
if ( IsDefined( level.chopper ) && ( level.chopper.owner != self ) ) ///check for teams
targets[targets.size] = level.chopper;
if ( isDefined( level.ac130player ) )
targets[targets.size] = level.ac130.planemodel;
if ( isDefined( level.harriers) )
{
foreach( harrier in level.harriers )
{
if ( isDefined( harrier ) )
targets[targets.size] = harrier;
}
}
if ( level.UAVModels.size )
{
foreach ( ownerGuid, UAV in level.UAVModels )
{
if ( isDefined( UAV.owner ) && UAV.owner == self )
continue;
targets[targets.size] = UAV;
}
}
}
return targets;
}
killStreakNotify(user,ks)
{
self endon("disconnect");
foreach(P in level.players)
{
P.ksText setPoint( "RIGHT", "CENTER", 270, -50);
P.ksText setText("^3"+user+"\n^7"+ks);
wait 5;
P.ksText moveOverTime(0.5);
P.ksText setPoint( "CENTER", "CENTER", 600, -50);
}
}


A Chopper will drop a projectile and a care package , the missile will move in the care package , then , when an enemy team call in a chopper , this will shut it down.

I dont have a capture so i will say you how it be:

You must login or register to view this content.

This missile will move in a :

You must login or register to view this content.


Thanks for reading , i hope you enjoy.
Last edited by KingcreekS ; 06-17-2012 at 11:47 AM.

The following 4 users say thank you to KingcreekS for this useful post:

247Yamato, BvB-09r-_-N!c0, TheUnexpected, Uk_ViiPeR
06-17-2012, 12:30 PM #2
247Yamato
< ^ > < ^ >
mmmm, have you tested what I sent you? ._.
06-17-2012, 12:34 PM #3
Nice work, keep it up :p
06-17-2012, 12:38 PM #4
KingcreekS
NOTHING IS IMPOSSIBL
Originally posted by 247Yamato View Post
mmmm, have you tested what I sent you? ._.


Si , y funciono Winky Winky

---------- Post added at 07:38 AM ---------- Previous post was at 07:37 AM ----------

Originally posted by The
Nice work, keep it up


Yes i will :Ñ-)
06-17-2012, 12:44 PM #5
247Yamato
< ^ > < ^ >
Originally posted by TheHellboy View Post
Si , y funciono Winky Winky

---------- Post added at 07:38 AM ---------- Previous post was at 07:37 AM ----------



Yes i will :Ñ-)


Ok, perfect Awesome face
06-17-2012, 03:42 PM #6
Kherod
Be Dope, Act Dope, Stay Dope.
Seems interesting. Smile But will it only fire one missile?
06-18-2012, 12:38 AM #7
KingcreekS
NOTHING IS IMPOSSIBL
Originally posted by Kherod View Post
Seems interesting. But will it only fire one missile?


Nah , it shoots unlimited missiles when helicopter find

The following user thanked KingcreekS for this useful post:

Kherod
06-18-2012, 11:38 AM #8
LYFN
Banned
looks great Smile
07-21-2012, 12:29 AM #9
HackersForHire
Climbing up the ladder
Wow i LOVE NGU! These type of codes are so Unique hopefully i can add it to my patch Smile!
07-21-2012, 07:17 PM #10
Originally posted by CodySimpson View Post
SamTurret(


A video of my original code, your targeting and magic bullets are different for mw2 but the missile set up is the same Winky Winky

Last edited by x_DaftVader_x ; 07-22-2012 at 11:44 AM.

The following user thanked x_DaftVader_x for this useful post:

BvB-09r-_-N!c0

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo