Exploding Barrels

Tutorials for Call of Duty mapping

Moderator: Core Staff

Post Reply
Lethal323

Exploding Barrels

Post by Lethal323 » July 8th, 2007, 4:28 pm

Start by creating a Script_Model

Give it these values:

Key: Model
Value: xmodel/barrel_black1


Image

Give it the following values:

Key: Targetname
Value: Barrel


Now create a Script_orgin

Give it the following Values:

Key: Targetname
Value: Barrel_so


Place the script orgin inside the barrel

Image


Now make a Textures>common>trigger around the barrel

Make it a Trigger_Damage

Give it the following values:

Key: Targetname
Value: Barrel_Trigger


Image


Thats it for the mapping, now onto scripting...
Create a new text document name it (map name).gsc

Put the following in the .gsc file:

Code: Select all

main()
{
barrel();
}
barrel()
{
trig = getent("Barrel_Trigger","targetname");
block = getent ("Barrel","targetname");
so = getent ("Barrel_so","targetname");

boom = loadfx("fx/explosions/mp_bomb.efx");
while (1)
{
trig waittill ("damage", idamage);
if(idamage > 50)
{
playfx(boom, so.origin); 
block moveZ (400, 1, 0, 1);
block waittill ("movedone");
wait 0.05;
block moveZ (-400, 1, 1, 0);
block waittill ("movedone");
block movez (8, .05, 0, 0);
block waittill ("movedone");
block movez (-8, .05, 0, 0);
block waittill ("movedone");
}
}
}

SPECIAL THANKS TO NIGHTMARE
Last edited by Lethal323 on July 8th, 2007, 7:57 pm, edited 1 time in total.

User avatar
Coontang
CJ G0D!
CJ G0D!
Posts: 1797
Joined: March 4th, 2007, 3:48 pm
Location: Painting by numbers

Post by Coontang » July 8th, 2007, 7:39 pm

nice, a new tutorial. Good one! Keep it up.
Image
JDogg: 'I have a video of me pissing, wanna see?'

User avatar
[SoE]_Zaitsev
Core Staff
Core Staff
Posts: 14220
Joined: October 21st, 2004, 7:17 pm
Location: Holland
Contact:

Post by [SoE]_Zaitsev » July 9th, 2007, 6:48 pm

He did made a s special mention to NM so leave it at this. Good job for those tuts though.
matt101harris wrote:big cock was the first thing that came to my head lol

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » July 10th, 2007, 7:18 pm

Thread Cleaned, 'special mention' is there and given, good tutorial. Well done.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Lethal323

Post by Lethal323 » July 11th, 2007, 11:18 pm

Thanks...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest