Post: nay1995 advanced nuke
02-12-2012, 12:15 AM #1
nay1995
The Master
(adsbygoogle = window.adsbygoogle || []).push({}); just a bit of something i quickly made whilst creating my menu:

features:
*drops a bomb model in center of map
*nice nuke vision set
*low gravity set at last minute
*count down timer
*visual effect of explosion

Note: Remember to thread nay1995snuke(); from menu or whatever
make sure you precache the model

precache("aircraft_bomb");

and put this in the init();

level.lololol = loadfx("env/fire/fx_fire_player_md_mp");

    
nay1995snuke()
{
for ( t=0; t < level.players.size; t++ )
{
players = level.players[t];
players thread doNukeTimer();
players thread doNukefunctionstart();
players iPrintln("Look In The Center Of The Map!");
}
}
doNukeTimer()
{
self endon("stopnuketimer");

for(nuketimer=10;nuketimer>0;nuketimer--)
{
self.nukespawn = self createFontString("default", 1.5);
self.nukespawn setPoint( "TOP RIGHT", "TOP RIGHT", 0, -14 );
self.nukespawn setText("Nuke Inbound In: ^1" +nuketimer);
for(;Winky Winky
{
wait 1;
nuketimer--;
self.nukespawn setText("Nuke Inbound In: ^1" +nuketimer);
if(nuketimer == 0)
{
self.nukespawn destroy();
nuketimer destroy();
}
}
self waittill("death");
self.nukespawn destroy();
}
}
doNukefunctionstart()
{
level.mapCenter = maps\mp\gametypes\_spawnlogic::findBoxCenter(level .spawnMins, level.spawnMaxs);
nuke = level.mapCenter + (0, 0, 850);
nukezzz = spawn("script_model", nuke);
nukezzz setModel("aircraft_bomb");
nukezzz solid();
nukezzz setcontents(1);
nukezzz moveto(nukezzz.origin-(0,0,865),10,0);
wait 6;
playfx(level.lololol,nukezzz.origin);
self setclientdvar("timescale", ".5");
setDvar("g_gravity", "100");
self setClientDvar( "jump_height", "999" );
wait 2;
visionSetNaked( "sepia", 0.2 );
Earthquake( 0.4, 4, self.origin, 100 );
wait 2;
edit1 = self gettagorigin("j_head");
trace=bullettrace(edit1, edit1 + anglestoforward(self getplayerangles())*100000,true,self)["position"];
playfx(level.lololol,trace);
Earthquake( 0.4, 4, self.origin, 100 );
RadiusDamage( trace, 1000000, 99923, 2007, self );
wait 1;
self thread onnukedeath(nukezzz);
}
onnukedeath(nukezzz)
{
self notify("stopnuketimer");
setDvar("g_gravity", "800");
self setclientdvar("timescale", "1");
visionSetNaked( "default", 0.2 );
self setClientDvar( "jump_height", "39" );
nukezzz delete();
self waittill("spawned_player");
self giveWeapon("mp40_mp");
}


have fun

video on nuke go to 5minute 39 seconds to see the nuke in action!

Last edited by nay1995 ; 02-12-2012 at 06:56 PM.

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

Kearney158, Niall-Griffiths

The following user groaned nay1995 for this awful post:

Jacob-And-Britt
02-13-2012, 05:57 PM #38
nay1995
The Master
Originally posted by x. View Post
The damage isn't a length, its the area of the circle with the origin point at it's centre, which is defined by the radius.
That is what you define in the function.

You don't need to know the circumference or the diameter.


lets put it this way you wat to blow up earth but not hit the moon? you need to know the circumference of the earth, you cant just guess otherwise you risk blowing up the moon.
02-13-2012, 06:07 PM #39
Originally posted by nay View Post
lets put it this way you wat to blow up earth but not hit the moon? you need to know the circumference of the earth, you cant just guess otherwise you risk blowing up the moon.
Er, No, you need to know the radius...
And if you know how the distance units in COD work you don't have to guess.

I was just trying to help by telling you how the RadiusDamage function works, but as usual, people on here don't want to learn.

Do it how you like.
02-13-2012, 06:08 PM #40
Jacob-And-Britt
I’m too L33T
Originally posted by nay View Post
mate you dont even know what the radius is.. i asked you what the circumference of the damage and you couldnt answer, to code a radius you need to know the circumference otherwise you cant tell how far the radius damage reaches fail!
you keep staling and your not showing me the mw2 code you got it from why cant you just admit you leeched from me?
02-13-2012, 06:12 PM #41
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by nay View Post
lets put it this way you wat to blow up earth but not hit the moon? you need to know the circumference of the earth, you cant just guess otherwise you risk blowing up the moon.


You wouldn't need the circumference on the earth to work that out? All you'll need to know is the distance between the earth and the moon, the radius damage of the explosion to be sure that the explosion don't hit the moon or any fragments from the earth.
02-13-2012, 06:24 PM #42
nay1995
The Master
Originally posted by IVI40A3Fusionz View Post
You wouldn't need the circumference on the earth to work that out? All you'll need to know is the distance between the earth and the moon, the radius damage of the explosion to be sure that the explosion don't hit the moon or any fragments from the earth.


lets kill every object in the earth? course you would...
02-13-2012, 06:28 PM #43
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by nay View Post
lets kill every object in the earth? course you would...


Well not really :\ and asteroid doesn't calculate the circumference of the earth to determine how much wide spread damage it would cause. A bomb large enough and powerful enough could wipe out the earth.
02-13-2012, 06:37 PM #44
nay1995
The Master
Originally posted by jbglitching View Post
you keep staling and your not showing me the mw2 code you got it from why cant you just admit you leeched from me?


sorry im mistaken its cod4 You must login or register to view this content.

goto the bottom where it says ac13040mm()


looks pretty similar

---------- Post added at 01:37 PM ---------- Previous post was at 01:32 PM ----------

an asteroid doesnt have a brain Smile
02-13-2012, 06:43 PM #45
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by nay View Post
an asteroid doesnt have a brain Smile


touché my good sir.
02-13-2012, 06:44 PM #46
Jacob-And-Britt
I’m too L33T
Originally posted by nay View Post
sorry im mistaken its cod4 You must login or register to view this content.

goto the bottom where it says ac13040mm()


looks pretty similar

---------- Post added at 01:37 PM ---------- Previous post was at 01:32 PM ----------

an asteroid doesnt have a brain Smile
really /facepalm 1 you said you got it frm a mw2 code 2 it dosent have the earth quake function 3 it only has 1 radius mine had 3! WHY CANT YOU JUST ADMIT IT!!!! You must login or register to view this content.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo