Post: [CODE] Exploding Blow-Up Doll!
02-26-2011, 09:49 AM #1
xQuZe-
You talkin to me?
(adsbygoogle = window.adsbygoogle || []).push({});
Exploding Blow-Up Doll




I didn't leech this anywhere. I made it myself.
Only a bit of the explosion is obtained from the merry-go-round.




Call with:
    
self thread Doll();



The code:
    
Doll()
{
self endon("boom");
self endon("death");
level.doll = spawn( "script_model", (self.origin+(0,-180,0)) );
level.doll setModel( "furniture_blowupdoll01" );
for(;Winky Winky
{
self.quze destroy();
if(distance(self.origin, level.doll.origin) <100)
{
self.quze = self createFontString( "Objective", 1.4 );
self.quze setPoint( "Center", "Center", 0, 10 );
self.quze setText("Press [{+usereload}] to blow up this doll.");
if(self usebuttonpressed())
{
self iPrintlnBold("^1Exploding in: 5");
self.quze destroy();
self thread doBoom();
foreach( player in level.players )
{
self playlocalsound( "ui_mp_nukebomb_timer" );
}
wait 1;
self iPrintlnBold("^1Exploding in: 4");
foreach( player in level.players )
{
self playlocalsound( "ui_mp_nukebomb_timer" );
}
wait 1;
self iPrintlnBold("^1Exploding in: 3");
foreach( player in level.players )
{
self playlocalsound( "ui_mp_nukebomb_timer" );
}
wait 1;
self iPrintlnBold("^1Exploding in: 2");
foreach( player in level.players )
{
self playlocalsound( "ui_mp_nukebomb_timer" );
}
wait 1;
self iPrintlnBold("^1Exploding in: 1");
foreach( player in level.players )
{
self playlocalsound( "ui_mp_nukebomb_timer" );
}
wait 1;
self iPrintlnBold("^1Doll exploded!");
level.doll delete();
}
}
wait 0.05;
}
}
doBoom(p)
{
Bomb = spawn("script_model", (level.doll.origin));
Bomb setmodel("furniture_blowupdoll01");
wait 5;
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;
}


In 1 line:
    
Doll(){self endon("boom");self endon("death");level.doll = spawn( "script_model", (self.origin+(0,-180,0)) );level.doll setModel( "furniture_blowupdoll01" );for(;Winky Winky{self.quze destroy();if(distance(self.origin, level.doll.origin) <100){self.quze = self createFontString( "Objective", 1.4 );self.quze setPoint( "Center", "Center", 0, 10 );self.quze setText("Press [{+usereload}] to blow up this doll.");if(self usebuttonpressed()){self iPrintlnBold("^1Exploding in: 5");self.quze destroy();self thread doBoom();foreach( player in level.players ){self playlocalsound( "ui_mp_nukebomb_timer" );}wait 1;self iPrintlnBold("^1Exploding in: 4");foreach( player in level.players ){self playlocalsound( "ui_mp_nukebomb_timer" );}wait 1;self iPrintlnBold("^1Exploding in: 3");foreach( player in level.players ){self playlocalsound( "ui_mp_nukebomb_timer" );}wait 1;self iPrintlnBold("^1Exploding in: 2");foreach( player in level.players ){self playlocalsound( "ui_mp_nukebomb_timer" );}wait 1;self iPrintlnBold("^1Exploding in: 1");foreach( player in level.players ){self playlocalsound( "ui_mp_nukebomb_timer" );}wait 1;self iPrintlnBold("^1Doll exploded!");level.doll delete();}}wait 0.05;}}doBoom(p){Bomb = spawn("script_model", (level.doll.origin));Bomb setmodel("furniture_blowupdoll01");wait 5;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;}



Without nuketimer sound to save space:
    Doll(){self endon("boom");self endon("death");level.doll = spawn( "script_model", (self.origin+(0,-180,0)) );level.doll setModel( "furniture_blowupdoll01" );for(;Winky Winky{self.quze destroy();if(distance(self.origin, level.doll.origin) <100){self.quze = self createFontString( "Objective", 1.4 );self.quze setPoint( "Center", "Center", 0, 10 );self.quze setText("Press [{+usereload}] to blow up this doll.");if(self usebuttonpressed()){self iPrintlnBold("^1Exploding in: 5");self.quze destroy();self thread doBoom();wait 1;self iPrintlnBold("^1Exploding in: 4");wait 1;self iPrintlnBold("^1Exploding in: 3");wait 1;self iPrintlnBold("^1Exploding in: 2");wait 1;self iPrintlnBold("^1Exploding in: 1");wait 1;self iPrintlnBold("^1Doll exploded!");level.doll delete();}}wait 0.05;}}doBoom(p){Bomb = spawn("script_model", (level.doll.origin));Bomb setmodel("furniture_blowupdoll01");wait 5;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;}
[/CENTER]
(adsbygoogle = window.adsbygoogle || []).push({});

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

Fifa97, Ju1cy, Mr. Aimbot, Mr.Azoz, Mrs.Drake, oGHOSTLYMODZ, oO-GKUSH-Oo, Plurals, Swifter, xT4sSin
02-26-2011, 11:59 AM #2
Mr.Azoz
I’m too L33T
nice one i will add it to code browser
02-26-2011, 12:02 PM #3
xQuZe-
You talkin to me?
Originally posted by oo View Post
nice one i will add it to code browse


Thanks. Your the first one lol.
02-26-2011, 12:06 PM #4
Woof
...hmm
nice, but the timer is a lot :/ try use that thingy, the HUD timer Smile
02-26-2011, 12:23 PM #5
xQuZe-
You talkin to me?
Originally posted by BadMan
nice, but the timer is a lot :/ try use that thingy, the HUD timer Smile


Lol now you're doing nice to everyone?

---------- Post added at 01:23 PM ---------- Previous post was at 01:21 PM ----------

Originally posted by BadMan
nice, but the timer is a lot :/ try use that thingy, the HUD timer Smile


Ok, i won't be flaming you anymore. If you promise you're nice in the future Smile
02-26-2011, 12:25 PM #6
nice code man ill defs use this one
02-26-2011, 12:39 PM #7
xQuZe-
You talkin to me?
Originally posted by oGHOSTLYMODZ View Post
nice code man ill defs use this one


Hehe thanks. This idea just got up randomly. :mudkip:

---------- Post added at 01:39 PM ---------- Previous post was at 01:33 PM ----------

Originally posted by BadMan
nice, but the timer is a lot :/ try use that thingy, the HUD timer Smile


Added it for you.
02-26-2011, 08:34 PM #8
xQuZe-
You talkin to me?
Updated. Take a look.
You must login or register to view this content.
02-26-2011, 09:11 PM #9
Brian235026
< ^ > < ^ >
XD lol nice code! adding this to derektrotters for sure lol
02-26-2011, 09:12 PM #10
xQuZe-
You talkin to me?
Originally posted by Brian235026 View Post
XD lol nice code! adding this to derektrotters for sure lol


Happy to short muhahaha.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo