Post: Air Propulsion Gun
07-09-2012, 03:25 PM #1
LightModz
League Champion
(adsbygoogle = window.adsbygoogle || []).push({});


Credits:
zxz0O0


this gun basically sucks or blows players. to change the function press L2.

    airgun()
{
self takeAllWeapons();
self giveWeapon("rpg_mp",6,false);
self SetWeaponAmmoStock("rpg_mp",0);
self setweaponammoclip("rpg_mp",0);
self switchToWeapon("rpg_mp");
self thread AirPop();
self thread CheckKey();
if(!isDefined(self.AirPropHud))
self HudElem();
self thread CheckMode();
}




CheckKey()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("noattack","-attack");
for(;Winky Winky
{
self waittill("noattack");
self.isAir = false;
}
}

AirPop()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("attack","+attack");
for(;Winky Winky
{
self waittill("attack");
self.isAir = true;
self.stingerStage = 2;
if(self getCurrentWeapon()!="rpg_mp")
continue;

while(self.isAir)
{
if(self getCurrentWeapon()!="rpg_mp")
{
self.isAir = false;
break;
}
ForwardTrace = Bullettrace(self getEye(),self getEye()+anglestoforward(self getplayerangles())*100000,true,self);
playerAngles = self GetPlayerAngles();
AtF = AnglesToForward(playerAngles);
self playLoopSound("oxygen_tank_leak_loop");
foreach(player in level.players)
{
if(player==self)
continue;

enemyToSelf = distance(self.origin,player.origin);
if(enemyToSelf>512)
continue;

if(ForwardTrace["entity"]!=player)
{

nearestPoint = PointOnSegmentNearestToPoint( self getEye(), ForwardTrace["position"], player.origin );
PtoO = distance(player.origin,nearestPoint);
co = (cos(35)*512);
TopLine = sqrt((512*512)-(co*co));
Multi = 512/TopLine;

if(enemyToSelf<PtoO*Multi)
continue;

}

dist = distance(self.origin,player.origin);
multi = 300/dist;
if(multi<1)
multi = 1;
if(self.AirPropSuction)
player setVelocity(player getVelocity() - (AtF[0]*(300*(multi)),AtF[1]*(300*(multi)),(AtF[2]+0.25)*(300*(multi))));
else
player setVelocity(player getVelocity() + (AtF[0]*(200*(multi)),AtF[1]*(200*(multi)),(AtF[2]+0.25)*(200*(multi))));
player ViewKick(100,self.origin);
}
wait 0.15;
}
self stopLoopSound("oxygen_tank_leak_loop");
}
}

HudElem()
{
self.AirPropHud = self createFontString("default",2);
self.AirPropHud setPoint("center","right",300,90);
self.AirPropSuction = false;
self.AirPropHud setText("Propulsion");

self thread DestroyOnDeath(self.AirPropHud);
}

DestroyOnDeath(elem)
{
self waittill("death");
elem destroy();
self stopLoopSound("oxygen_tank_leak_loop");
}

CheckMode()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("useButton","+smoke");
for(;Winky Winky
{
self waittill("useButton");
if(self getCurrentWeapon()!="rpg_mp")
continue;
self.AirPropSuction = !self.AirPropSuction;
self disableWeapons();
if(self.AirPropSuction)
self.AirPropHud setText("Suction");
else
self.AirPropHud setText("Propulsion");
self playSound("elev_run_end");
self playSound("elev_door_interupt");
self playSound("elev_run_start");
wait 1.5;
self EnableWeapons();
}
}

(adsbygoogle = window.adsbygoogle || []).push({});

The following 15 users say thank you to LightModz for this useful post:

247Yamato, fluffyTHEnutsak, GiGaOcTeTs, idropcats, Ingloreusemodz, KCxFTW, JokerRey, Ninja, Jango, Cmd-X, Rangers 1690, RaspberryIce, T_m_b07, TheFallen, WinterLobbies
07-09-2012, 03:30 PM #2
nice thread Winky Winky
07-09-2012, 03:44 PM #3
GiGaOcTeTs
Pokemon Trainer
Originally posted by LightModz View Post


Credits:
zxz0O0


this gun basically sucks or blows players. to change the function press L2.

    airgun()
{
self takeAllWeapons();
self giveWeapon("rpg_mp",6,false);
self SetWeaponAmmoStock("rpg_mp",0);
self setweaponammoclip("rpg_mp",0);
self switchToWeapon("rpg_mp");
self thread AirPop();
self thread CheckKey();
if(!isDefined(self.AirPropHud))
self HudElem();
self thread CheckMode();
}




CheckKey()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("noattack","-attack");
for(;Winky Winky
{
self waittill("noattack");
self.isAir = false;
}
}

AirPop()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("attack","+attack");
for(;Winky Winky
{
self waittill("attack");
self.isAir = true;
self.stingerStage = 2;
if(self getCurrentWeapon()!="rpg_mp")
continue;

while(self.isAir)
{
if(self getCurrentWeapon()!="rpg_mp")
{
self.isAir = false;
break;
}
ForwardTrace = Bullettrace(self getEye(),self getEye()+anglestoforward(self getplayerangles())*100000,true,self);
playerAngles = self GetPlayerAngles();
AtF = AnglesToForward(playerAngles);
self playLoopSound("oxygen_tank_leak_loop");
foreach(player in level.players)
{
if(player==self)
continue;

enemyToSelf = distance(self.origin,player.origin);
if(enemyToSelf>512)
continue;

if(ForwardTrace["entity"]!=player)
{

nearestPoint = PointOnSegmentNearestToPoint( self getEye(), ForwardTrace["position"], player.origin );
PtoO = distance(player.origin,nearestPoint);
co = (cos(35)*512);
TopLine = sqrt((512*512)-(co*co));
Multi = 512/TopLine;

if(enemyToSelf<PtoO*Multi)
continue;

}

dist = distance(self.origin,player.origin);
multi = 300/dist;
if(multi<1)
multi = 1;
if(self.AirPropSuction)
player setVelocity(player getVelocity() - (AtF[0]*(300*(multi)),AtF[1]*(300*(multi)),(AtF[2]+0.25)*(300*(multi))));
else
player setVelocity(player getVelocity() + (AtF[0]*(200*(multi)),AtF[1]*(200*(multi)),(AtF[2]+0.25)*(200*(multi))));
player ViewKick(100,self.origin);
}
wait 0.15;
}
self stopLoopSound("oxygen_tank_leak_loop");
}
}

HudElem()
{
self.AirPropHud = self createFontString("default",2);
self.AirPropHud setPoint("center","right",300,90);
self.AirPropSuction = false;
self.AirPropHud setText("Propulsion");

self thread DestroyOnDeath(self.AirPropHud);
}

DestroyOnDeath(elem)
{
self waittill("death");
elem destroy();
self stopLoopSound("oxygen_tank_leak_loop");
}

CheckMode()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("useButton","+smoke");
for(;Winky Winky
{
self waittill("useButton");
if(self getCurrentWeapon()!="rpg_mp")
continue;
self.AirPropSuction = !self.AirPropSuction;
self disableWeapons();
if(self.AirPropSuction)
self.AirPropHud setText("Suction");
else
self.AirPropHud setText("Propulsion");
self playSound("elev_run_end");
self playSound("elev_door_interupt");
self playSound("elev_run_start");
wait 1.5;
self EnableWeapons();
}
}



I use it and it's fun.
Is it possible to create a function to vary the intensity of propulsion?
07-09-2012, 04:15 PM #4
LightModz
League Champion
Originally posted by GiGaOcTeTs View Post
I use it and it's fun.
Is it possible to create a function to vary the intensity of propulsion?


proberly but ive got other things to do with modding :P
07-09-2012, 04:35 PM #5
KCxFTW
Who’s Jim Erased?
Originally posted by LightModz View Post


Credits:
zxz0O0


this gun basically sucks or blows players. to change the function press L2.

    airgun()
{
self takeAllWeapons();
self giveWeapon("rpg_mp",6,false);
self SetWeaponAmmoStock("rpg_mp",0);
self setweaponammoclip("rpg_mp",0);
self switchToWeapon("rpg_mp");
self thread AirPop();
self thread CheckKey();
if(!isDefined(self.AirPropHud))
self HudElem();
self thread CheckMode();
}




CheckKey()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("noattack","-attack");
for(;Winky Winky
{
self waittill("noattack");
self.isAir = false;
}
}

AirPop()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("attack","+attack");
for(;Winky Winky
{
self waittill("attack");
self.isAir = true;
self.stingerStage = 2;
if(self getCurrentWeapon()!="rpg_mp")
continue;

while(self.isAir)
{
if(self getCurrentWeapon()!="rpg_mp")
{
self.isAir = false;
break;
}
ForwardTrace = Bullettrace(self getEye(),self getEye()+anglestoforward(self getplayerangles())*100000,true,self);
playerAngles = self GetPlayerAngles();
AtF = AnglesToForward(playerAngles);
self playLoopSound("oxygen_tank_leak_loop");
foreach(player in level.players)
{
if(player==self)
continue;

enemyToSelf = distance(self.origin,player.origin);
if(enemyToSelf>512)
continue;

if(ForwardTrace["entity"]!=player)
{

nearestPoint = PointOnSegmentNearestToPoint( self getEye(), ForwardTrace["position"], player.origin );
PtoO = distance(player.origin,nearestPoint);
co = (cos(35)*512);
TopLine = sqrt((512*512)-(co*co));
Multi = 512/TopLine;

if(enemyToSelf<PtoO*Multi)
continue;

}

dist = distance(self.origin,player.origin);
multi = 300/dist;
if(multi<1)
multi = 1;
if(self.AirPropSuction)
player setVelocity(player getVelocity() - (AtF[0]*(300*(multi)),AtF[1]*(300*(multi)),(AtF[2]+0.25)*(300*(multi))));
else
player setVelocity(player getVelocity() + (AtF[0]*(200*(multi)),AtF[1]*(200*(multi)),(AtF[2]+0.25)*(200*(multi))));
player ViewKick(100,self.origin);
}
wait 0.15;
}
self stopLoopSound("oxygen_tank_leak_loop");
}
}

HudElem()
{
self.AirPropHud = self createFontString("default",2);
self.AirPropHud setPoint("center","right",300,90);
self.AirPropSuction = false;
self.AirPropHud setText("Propulsion");

self thread DestroyOnDeath(self.AirPropHud);
}

DestroyOnDeath(elem)
{
self waittill("death");
elem destroy();
self stopLoopSound("oxygen_tank_leak_loop");
}

CheckMode()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("useButton","+smoke");
for(;Winky Winky
{
self waittill("useButton");
if(self getCurrentWeapon()!="rpg_mp")
continue;
self.AirPropSuction = !self.AirPropSuction;
self disableWeapons();
if(self.AirPropSuction)
self.AirPropHud setText("Suction");
else
self.AirPropHud setText("Propulsion");
self playSound("elev_run_end");
self playSound("elev_door_interupt");
self playSound("elev_run_start");
wait 1.5;
self EnableWeapons();
}
}



I tried it and its pretty freaking awesome! :y: Great job!
07-09-2012, 04:40 PM #6
Ha! Nice one,this is quite fun dude!! Cheers :y:

The following user thanked Hashishiyun for this useful post:

LightModz
07-09-2012, 04:59 PM #7
LightModz
League Champion
Originally posted by Hashishiyun View Post
Ha! Nice one,this is quite fun dude!! Cheers :y:

Smile glad you like it
07-09-2012, 05:03 PM #8
Originally posted by LightModz View Post
Smile glad you like it


yeah defo mate,thanks for sharing,appreciated when people share this Smile
07-09-2012, 05:03 PM #9
Jango
I love my kitteh
I like when people suck or blow me Cool Man (aka Tustin)

The following 2 users say thank you to Jango for this useful post:

LightModz, JokerRey
07-09-2012, 05:09 PM #10
JokerRey
League Champion
It Looks Cool :lol:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo