Post: [CODE]RusterG's Ray Gun and Ray Gun Pack o Punch[RELEASE]
03-18-2011, 09:40 PM #1
RusterG
The one and Only
(adsbygoogle = window.adsbygoogle || []).push({}); here is a little code i made... i tweaked my ray gun and made a Pack O Punch box specifically for the ray gun... hope you's enjoy :-)

[ame="https://www.youtube.com/watch?v=Qd_SHWSH3xg"]RusterG's Ray Gun And Ray Gun Pack O Punch[/ame]


Needed for the modded bullet:
    
GetCursorPos1337()
{
forward = self getTagOrigin("tag_eye");
end = self thread vector_scal1337(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self)[ "position" ];
return location;
}



This is the Ray Gun Code...
    add equipRayGun;
to the menu funcs.
    
equipRayGun(fxthan, fxthun, fxtrus)
{
self endon("Effect2");
self endon("death");
self WeapTake();
playSoundonPlayers( game["music"]["victory_allies"], "allies" );
level._effect[ "ac130_flare1" ] = loadfx( "misc/flares_cobra" );
level._effect[ "ac130_flare" ] = loadfx( "misc/flares_cobra" );
level.spawnGlow["friendly"] = loadfx( "misc/flare_ambient_green" );
self giveWeapon("deserteagle_mp", 7, false);
self switchToWeapon("deserteagle_mp");
self iprintln("^2The gods have blessed you with a ^5Ray Gun!");
wait 3;
self maps\mp\gametypes\_hud_message::hintMessage("^5OMG its a ray gun! Go give em ^1hell!");
for(;Winky Winky
{
self waittill ( "weapon_fired" );
if( self getCurrentWeapon() == "deserteagle_mp" )

fxthan = SpawnFx(level._effect[ "ac130_flare1" ], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxthun = SpawnFx(level._effect[ "ac130_flare" ], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxtrus = SpawnFx(level.spawnGlow["friendly"], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxthan.angles = (50,50,50);
fxthun.angles = (0,0,0);
fxtrus.angles = (0,0,0);
TriggerFX(fxthan);
TriggerFX(fxthun);
TriggerFX(fxtrus);
wait .2;
fxthun delete();
wait .4;
fxthan delete();
fxtrus delete();
}
}




and this is the pack o punch code...

add
     spawnPackoPunch; 
to the menu...

    
spawnPackoPunch(fxtpro, fxtter, fxtrus){
self iprintln("^2Pack-O-Punch spawned");
level.box = spawn( "script_model", (self.origin+(0, -180, 0)) );
level.box setModel( "com_plasticcase_Enemy" );
level.box Solid();
level.box CloneBrushmodelToScriptmodel(level.airDropCrateCollision);

for(;Winky Winky
{
self.quze destroy();
if(distance(self.origin, level.box.origin) <100)
{
self.quze = self createFontString( "hudbig", 1.0 );
self.quze setPoint( "Center", "Center", 0, 5 );
self.quze setText("^2Press [{+usereload}] to pack o punch");
if(self usebuttonpressed())
{
self.quze destroy();
self takeWeapon(self getCurrentWeapon());
self maps\mp\gametypes\_hud_message::hintMessage("^2Pack o punch initalized!");
wait 3;
self iprintlnBold("^2Pack O Punch Complete in ^1 3");
wait 1;
self iprintlnBold("^2Pack O Punch Complete in ^1 2");
wait 1;
self iprintlnBold("^2Pack O Punch Complete in ^1 1");
wait 1;
self doRayGunEffects();
self iprintlnBold("^2Pack O Punch Complete!");
}
}
wait 0.05;
}
}
doRayGunEffects(fxtrus, fxtter, fxtpro)
{
self endon("death");
self notify("Effect2");
level.spawnGlow["Enemy"] = loadfx( "misc/flare_ambient" );
for(;Winky Winky
{
self giveWeapon("deserteaglegold_mp");
self switchToWeapon("deserteaglegold_mp");
self waittill ( "weapon_fired" );
if( self getCurrentWeapon() == "deserteaglegold_mp" )
fxtpro = SpawnFx(level._effect[ "ac130_flare1" ], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxtter = SpawnFx(level._effect[ "ac130_flare" ], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxtrus = SpawnFx(level.spawnGlow["Enemy"], self GetCursorPos(), self getTagOrigin("tag_eye"));
fxtpro.angles = (50,50,50);
fxtter.angles = (0,0,0);
fxtrus.angles = (0,0,0);
TriggerFX(fxtpro);
TriggerFX(fxtter);
TriggerFX(fxtrus);
MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self thread GetCursorPos1337(), self );
wait .2;
fxtpro delete();
wait .4;
fxtter delete();
fxtrus delete();
}
}



if you want the pack o punch to spawn when you equip the ray gun, just add this:

    self thread spawnPackoPunch();


under neath this in the Ray Gun Code:

    
level.spawnGlow["friendly"] = loadfx( "misc/flare_ambient_green" );


Enjoy..
Credits:
are as far as i know:

xQuZe- (Box and helped fix a bug)

THEDUBMAN101 (Helped Fix Bugs)

srk74 (idea to change it from a red tactical to a green >...>Winky Winky

if im missing anyone please let me know and i will add them to the credits thanks :y:
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to RusterG for this useful post:

amplif1er, Demmonnixx, dex2grigg, DR-Dizzy, LINUX♥, W0W
03-19-2011, 05:15 PM #20
.Pluto
Splicer
Originally posted by RusterG View Post
sure whats up?

---------- Post added at 05:12 PM ---------- Previous post was at 05:07 PM ----------



yeah that other dude.... im pretty sure was joking and it was entirely my idea to put the tactical insertions in the ray gun, not his....

heres You must login or register to view this content. 247 yamatoes zombie patch it shows his ray gun in the video.....

a pp2000 smg that shoots green scattered lights...

do you have team viewer? i got lots of questions
03-19-2011, 05:18 PM #21
RusterG
The one and Only
Originally posted by .Pluto View Post
do you have team viewer? i got lots of questions


yeah i have team viewer, pm me your login stuff... i'll be on in about 5 - 10 minutes... quickly doing some stuff....
03-19-2011, 05:30 PM #22
247Yamato
< ^ > < ^ >
Originally posted by RusterG View Post
sure whats up?

---------- Post added at 05:12 PM ---------- Previous post was at 05:07 PM ----------



yeah that other dude.... im pretty sure was joking and it was entirely my idea to put the tactical insertions in the ray gun, not his....

heres You must login or register to view this content. 247 yamatoes zombie patch it shows his ray gun in the video.....

a pp2000 smg that shoots green scattered lights...


The raygun that is in Chaotic invasion is not that one, is much better. It looks like a real raygun.
03-19-2011, 05:38 PM #23
RusterG
The one and Only
Originally posted by 247Yamato View Post
The raygun that is in Chaotic invasion is not that one, is much better. It looks like a real raygun.


oh cool, mind giving us the ray gun code so i can check it out or showing a vid of it?
03-19-2011, 05:56 PM #24
SupImBirdy
Climbing up the ladder
pretty cool!
03-19-2011, 06:08 PM #25
how do you guys make this stuff do you test it on mw2 pc first?
03-19-2011, 06:49 PM #26
247Yamato
< ^ > < ^ >
Originally posted by RusterG View Post
oh cool, mind giving us the ray gun code so i can check it out or showing a vid of it?


You must login or register to view this content.
03-19-2011, 07:03 PM #27
RusterG
The one and Only
Originally posted by 247Yamato View Post
You must login or register to view this content.


i dunno if its just me.... but when i try to call the ray gun it from the menu nothing happens....
03-19-2011, 07:28 PM #28
247Yamato
< ^ > < ^ >
Originally posted by RusterG View Post
i dunno if its just me.... but when i try to call the ray gun it from the menu nothing happens....


you have to thread that code in Init():

self thread main();

and then put this:

self giveWeapon("pp2000_eotech_mp",7,false);

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo