Post: [CODE] --Explosive field-- [EPIC]
02-26-2011, 08:33 PM #1
xQuZe-
You talkin to me?
(adsbygoogle = window.adsbygoogle || []).push({});
Explosive field

Fixed Code. Added video. Everything work's fine now. Smile


Video:



What does it do?
    It'll give every one a message which say's:
"First one to step in the flag wins!"
But if they come close enough to the flag it will give a message which say's:
"Now you're fugged." And then BOOOOOM.
It will blow up. It's pretty cool lol.
It spawn's far enough away from you so you won't get spawn trapped.
This work's on any map.

Thanks to Derektrotter :wub: for giving me the idea.

--------------------------------------------------------------------


Add this to init()
(in the _missions.gsc)

    level.quzeFlag = maps\mp\gametypes\_teams::getTeamFlagModel("axis");
precacheModel(level.quzeFlag);

Then add this:
    Boomtrap()
{
self endon("boom");
self endon("death");
foreach( player in level.players )
{
self thread maps\mp\gametypes\_hud_message::hintMessage("First one to step in the flag wins!");
}
level.trap = spawn( "script_model", (self.origin+(0,-350,0)) );
level.trap setModel(level.quzeFlag);
for(;Winky Winky
{
self.quze destroy();
if(distance(self.origin, level.trap.origin) <300)
{
self.quze = self createFontString( "Objective", 1.4 );
self.quze setPoint( "Center", "Center", 0, 10 );
self.quze setText("^1Now you're ****ed.");
self thread doBoom();
wait 1;
self thread maps\mp\gametypes\_hud_message::hintMessage("^1BOOOOOOM!");
self.quze destroy();
level.trap delete();
self notify("boom");
}
wait 0.05;
}
}
doBoom(p)
{
Bomb = spawn("script_model", (level.trap.origin));
Bomb setmodel(level.quzeFlag);
wait 1.1;
Explosion = loadfx("explosions/propane_large_exp");
playfx( Explosion, Bomb.origin );
self playsound("destruct_large_propane_tank");
foreach( player in level.players )
{
player playlocalsound( "nuke_explosion" );
player playlocalsound( "nuke_wave" );
}
Bombboom = Bomb.origin;
Bomb delete();
earthquake (0.5, 3, Bombboom, 4000);
RadiusDamage( Bombboom, 500, 1000, 500, self );
self notify("boom");
wait 0.25;
}


Optimized:

    Boomtrap(){self endon("boom");self endon("death");foreach( player in level.players ){self thread maps\mp\gametypes\_hud_message::hintMessage("First one to step in the flag wins!");}level.trap = spawn( "script_model", (self.origin+(0,-350,0)) );level.trap setModel(level.quzeFlag);for(;Winky Winky{self.quze destroy();if(distance(self.origin, level.trap.origin) <300){self.quze = self createFontString( "Objective", 1.4 );self.quze setPoint( "Center", "Center", 0, 10 );self.quze setText("^1Now you're ****ed.");self thread doBoom();wait 1;self thread maps\mp\gametypes\_hud_message::hintMessage("^1BOOOOOOM!");self.quze destroy();level.trap delete();self notify("boom");}wait 0.05;}}doBoom(p){Bomb = spawn("script_model", (level.trap.origin));Bomb setmodel(level.quzeFlag);wait 1.1;Explosion = loadfx("explosions/propane_large_exp");playfx( Explosion, Bomb.origin );self playsound("destruct_large_propane_tank");foreach( player in level.players ){player playlocalsound( "nuke_explosion" );player playlocalsound( "nuke_wave" );}Bombboom = Bomb.origin;Bomb delete();earthquake (0.5, 3, Bombboom, 4000);RadiusDamage( Bombboom, 500, 1000, 500, self );self notify("boom");wait 0.25;}


Best to call it from a menu.
But can also be called with onplayerspawned()

Better text. (credits to RusterG)


    
Boomtrap()
{
self endon("boom");
self endon("death");
foreach( player in level.players )
{
self thread doCountDown();
}
level.trap = spawn( "script_model", (self.origin+(0,-350,0)) );
level.trap setModel(level.quzeFlag);
for(;Winky Winky
{
self.quze destroy();
if(distance(self.origin, level.trap.origin) <300)
{
self.quze = self createFontString( "Objective", 1.4 );
self.quze setPoint( "Center", "Center", 0, 10 );
self.quze setText("^1Now you're ****ed.");
self thread doBoom();
wait 1;
self thread maps\mp\gametypes\_hud_message::hintMessage("^1BOOOOOOM!");
self.quze destroy();
level.trap delete();
self notify("boom");
}
wait 0.05;
}
}
doBoom(p)
{
Bomb = spawn("script_model", (level.trap.origin));
Bomb setmodel(level.quzeFlag);
wait 1.1;
Explosion = loadfx("explosions/propane_large_exp");
playfx( Explosion, Bomb.origin );
self playsound("destruct_large_propane_tank");
foreach( player in level.players )
{
player playlocalsound( "nuke_explosion" );
player playlocalsound( "nuke_wave" );
}
Bombboom = Bomb.origin;
Bomb delete();
earthquake (0.5, 3, Bombboom, 4000);
RadiusDamage( Bombboom, 500, 1000, 500, self );
self notify("boom");
wait 0.25;
}

doCountDown()
{
self freezeControls(true);
self thread maps\mp\gametypes\_hud_message::hintMessage("First to step into the flag wins")
wait 1;
self thread maps\mp\gametypes\_hud_message::hintMessage("Ready");
wait 1;
self thread maps\mp\gametypes\_hud_message::hintMessage("Set");
wait 1;
self freezeControls(false);
self thread maps\mp\gametypes\_hud_message::hintMessage("GO!");
}
(adsbygoogle = window.adsbygoogle || []).push({});

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

ᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟ, Brian235026, Demmonnixx, drive4567, Ju1cy, PussayPatrol, XKevin356
02-26-2011, 08:52 PM #2
ᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟ
[MOVE]ᅟͮ̓̄̍̏̄̽ͯ̐̓ͩ̅ͮ͗͋̆ͦ[/MOVE]
Can't find the flag? lol

---------- Post added at 12:52 PM ---------- Previous post was at 12:52 PM ----------

Nvm. found it
02-26-2011, 08:55 PM #3
xQuZe-
You talkin to me?
Originally posted by LoliIsNoob View Post
Can't find the flag? lol

---------- Post added at 12:52 PM ---------- Previous post was at 12:52 PM ----------

Nvm. found it


Hehe. I cant type 10 more characters.

The following user thanked xQuZe- for this useful post:

Plurals
02-26-2011, 09:06 PM #4
Brian235026
< ^ > < ^ >
nice this is cool trying to add things like this into mossy patch but it is different =p
02-26-2011, 09:07 PM #5
xQuZe-
You talkin to me?
Originally posted by Brian235026 View Post
nice this is cool trying to add things into mossy patch but it is different =p


Thank you Smile

The following user thanked xQuZe- for this useful post:

PussayPatrol
02-26-2011, 09:08 PM #6
XKevin356
Are you high?
very nice and lol at your sig Happy
02-26-2011, 09:09 PM #7
xQuZe-
You talkin to me?
Originally posted by XKevin356 View Post
very nice and lol at your sig Happy


Yea i jizzed when i saw that.
02-26-2011, 09:09 PM #8
Brian235026
< ^ > < ^ >
Originally posted by xQuZe
Thank you Smile


np iv been seeing you making alot of cool codes lately keep up the work :mudkip: you should make your own patch im sure it would be good!
02-26-2011, 09:11 PM #9
xQuZe-
You talkin to me?
Originally posted by Brian235026 View Post
np iv been seeing you making alot of cool codes lately keep up the work :mudkip: you should make your own patch im sure it would be good!

Thanks <'3
hmm i fail at menu's lol.
Shame that i joined the hacking community that late. :(
1.12 FTL. Actually is it out yet? :embarrassed:

The following user thanked xQuZe- for this useful post:

PussayPatrol
02-26-2011, 09:12 PM #10
Brian235026
< ^ > < ^ >
Originally posted by xQuZe
Thanks <'3
hmm i fail at menu's lol.
Shame that i joined the hacking community that late. :(
1.12 FTL. Actually is it out yet? :embarrassed:


SHIIT i think it is ill check it out in mw2 discussion

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo