Members Online»
0 Active | 94 Guests
Online:
|
LATEST FORUM THREADS»
by StrYdeR
Posts: 3 / 163 The Future of MODSonline
In The News by KAZAM3766
Posts: 1 / 516 CoD: Battle Royale
CoD+UO Map + Mod Releases by morgawr
Posts: 1 / 2586 Damaged .pk3's
CoD Mapping by lazygit
Posts: 1 / 3099 heli to attack ai
CoD4 SP Mapping by DrBiggzz
Posts: 11 / 992 New Cod UO Rifle Mod.
CoD Mapping |
Polls»
|
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»
Comments: 5
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which... Comments: 5
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ... Comments: 5
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead?
... Comments: 5
Codutility.com up and runn...
It seems to me the like the site is completely dead? Comments: 5
Codutility.com up and runn...
Yeeaahhhh.........
|
Latest Downloads»
OHMY Don Quixote
Call of Duty 2: Maps: Multiplayer (5.76Mb) OHMY Neuburg
Call of Duty 2: Maps: Multiplayer (6.84Mb) OHMY Tebessa
Call of Duty 2: Maps: Multiplayer (7.36Mb) OHMY POW Camp
Call of Duty 2: Maps: Multiplayer (2.15Mb) OHMY Valley
Call of Duty 2: Maps: Multiplayer (5.7Mb) |
Partners & Friends»
|
Site Links and Information
|
Partners
|
Friends
|
Copyright © MODSonline LLC
Tresware Content Management System © 2011
Website Designed by LKFX and Developed by Tresware