Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 94 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
CoD4 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
How to make explosive models
Versions: You must be logged in to view history.
kmabigtime shows you how to make explosive models

I wanted to make fire extinguishers & propane tanks into explosives, so this is what I came up with..If u need to have the model clipped then you will need to make it a prefab, if no clip is nessessary, then just adding the model to your map will work..

To make the prefab: Open radiant to a new map, add the model you wish to use, make it a script_model with key: targetname, value: explodable_model & check the the 2 no shadow boxes..Unselect it.
Then clip it & make the clip a script_brushmodel & I check the dyna path box..Unselect it.
Now you need select the model first, then the clip & press W..
Make sure you line align the blue box of the model to (0,0,0) on the grid, then save in your prefab folder...

If no clip is nessessary (as in something small, like the fire extinguisher), just add the model directly to your map, make it a script_model with key: targetname, value: explodable_model.

You can put this script into its own "_explosive_models.gsc" & place it in the raw/maps/mp folder along with the other gsc's.
Then add this line in your mapname.gsc: maps\mp\_explosive_models::main();
& update your zone file with this line: rawfile,maps/mp/_explosive_models.gsc

Here is the script

main()
{
models = getentarray("explodable_model", "targetname");
if (models.size > 0)
{
level.breakables_fx["explode"] = loadfx( "explosions/grenadeexp_metal" );
}

level.barrelExpSound = "explo_metal_rand";

for(i = 0; i < models.size; i++)
{
models[i] thread explodable_model_think();
}
}

explodable_model_think()
{
//targeted brushmodels take priority over proximity based breakables - nate
if (isdefined(self.target))
{
targ = getent(self.target,"targetname");
if(targ.classname == "script_brushmodel")
{
self.remove = targ;
}
}
accumulate = 40;
threshold = 0;
dmg = 0;

self setcandamage(true);
while(1)
{
self waittill("damage", amount, other);
if (amount >= threshold)
{
dmg += amount;
if (dmg >= accumulate)
{
self thread explodable_model_explode();
}
}
}
}

explodable_model_explode()
{
Self = getentarray("explodable_model", "targetname");

if (isdefined (self.remove))
{
self.remove delete();
}

if(isdefined(self))
{
origin = self getorigin();
range = 200;
maxdamage = 200;
mindamage = 1;

self playsound (level.barrelExpSound);
playfx(level.breakables_fx["explode"], origin);
radiusDamage(origin, range, maxdamage, mindamage);

self delete();
}

}

 

The maxdamage, range, & type of grenade blast used for the explosion can be adjusted to whatever you want...

I hope this is useful...


kmabigtime aka [aSu]BigTime! (asuclan.com)


Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»