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-27-2011, 05:24 PM #20
Demmonnixx
Vault dweller
Originally posted by xQuZe
Explosive field

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


Video:You must login or register to view this content.


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()


Very cool bro! Thanks for sharingCool Man (aka Tustin).
02-27-2011, 05:35 PM #21
MuRkDu
Do a barrel roll!
this is sick!!@
02-27-2011, 07:06 PM #22
xQuZe-
You talkin to me?
Originally posted by Demmonnixx View Post
Very cool bro! Thanks for sharingCool Man (aka Tustin).


Thx lol. See its not copy pasta?

---------- Post added at 08:06 PM ---------- Previous post was at 08:06 PM ----------

Originally posted by MuRkDu View Post
this is sick!!@


Thx bro :pedo::pedo:
03-08-2011, 10:26 AM #23
RusterG
The one and Only
Originally posted by xQuZe
Explosive field

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


Video:You must login or register to view this content.


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()


this may be a little late Happy but you should add a freeze player function to that... and a countdown timer...

so its like,

    
doCountDown(){
self thread Boomtrap();
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!");
}


i used the hintMessage as a timer because its easier to add than the timer i think it was daftvader... made.... that was used on the mega airdrop... i forget who made it Happy
03-08-2011, 01:32 PM #24
alipc09
You talkin to me?
it would be good if u make a game mode of it like there is explosive field hidden and try to pass it and get to the flag Happy
03-08-2011, 01:38 PM #25
xQuZe-
You talkin to me?
Originally posted by RusterG View Post


this may be a little late Happy but you should add a freeze player function to that... and a countdown timer...

so its like,

    
doCountDown(){
self thread Boomtrap();
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!");
}


i used the hintMessage as a timer because its easier to add than the timer i think it was daftvader... made.... that was used on the mega airdrop... i forget who made it Happy


You could do that yea.. Smile
I made it more as a code. Not really as a gamemode;P
I just added that text for the lulz.
03-08-2011, 01:41 PM #26
RusterG
The one and Only
Originally posted by xQuZe
You could do that yea.. Smile
I made it more as a code. Not really as a gamemode;P
I just added that text for the lulz.


yeah its not for a game mode Happy it will give them more of a surprise Happy...

they will think they will get something special and then BOOM Happy
03-08-2011, 01:43 PM #27
xQuZe-
You talkin to me?
Originally posted by RusterG View Post
yeah its not for a game mode Happy it will give them more of a surprise Happy...

they will think they will get something special and then BOOM Happy


Added it. Happy
03-08-2011, 02:25 PM #28
RusterG
The one and Only
Originally posted by xQuZe
Added it. Happy


haha nice one :P

---------- Post added at 02:25 PM ---------- Previous post was at 01:46 PM ----------

Originally posted by xQuZe
You could do that yea.. Smile
I made it more as a code. Not really as a gamemode;P
I just added that text for the lulz.


i just made a ray gun Happy it looks pretty sexy, just fixng a Bug in it Happy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo