OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: DeanosBeano on 20 Jun 2006, 00:36:17

Title: fragmentaion afetr hit
Post by: DeanosBeano on 20 Jun 2006, 00:36:17
Hi all and ty in advance.
       looked for similar but couldnt find. What i am after is similar to the effect in ecp, where a tank is hit and pieces fly. i have made an addon but when it gets hit / destroyed ,it looks boring. i was hoping to delete the addon on destroyed and then have pieces fly of at random.

also does anybody know a great reffence for thins like ,destr types .etc for e.g destrType="Destructno"; etc . i am new to addons, been scripting for 4 years , pls excuse my noobness, and ty for any advice.

         DB
Title: Re: fragmentaion afetr hit
Post by: Planck on 20 Jun 2006, 02:10:51
I am a bit pressed for time at the moment, but as for the DestructTypes,

Try  Models & ClassNames by yours truly here:

http://www.ofpec.com/ed_depot/tutes.htm



Planck
Title: Re: fragmentaion afetr hit
Post by: oyman on 20 Jun 2006, 02:53:13
here are the destr types I could find
Code: [Select]
destrType="DestructEngine";
destrType="DestructBuilding";
destrType="DestructTree";
destrType="DestructTent";


You should be able to figure out what they do. But DestructEngine is the one where the thing will explode.
Title: Re: fragmentaion afetr hit
Post by: remcen on 20 Jun 2006, 13:47:41
you can script those effects with an eventhandler.

check out grendel's k-kill scripts for example. (http://ofp.neco.cz/index.php?showthis=8526) afaik it uses the killed eventhandler with which you can trigger further drop command-based scripts then, or eject those pieces of debris from the tank.

the classnames of the debris are FXExploArmor1, FXExploArmor3 and FXExploArmor3 btw.
Title: Re: fragmentaion afetr hit
Post by: DeanosBeano on 20 Jun 2006, 17:52:22
thanks all for the replies. much appreciated.
one other thing does anyone know ,where i can find the config for thr bis barrel in the ofp route ??
Title: Re: fragmentaion afetr hit
Post by: Planck on 20 Jun 2006, 19:39:04
The entries from the game config is so:

Code: [Select]
class BarrelHelper:Thing
{
scope=0;
simulation="thing";
mapSize=0.7;
displayName="$STR_DN_BARREL";
accuracy=0.2;
transportFuel=100;
destrType=destructengine;
};

class BarrelBase:BarrelHelper
{
accuracy=1000; // Never recognize
armor=100;
cost=0;
};

class Barrels:BarrelBase
{
scope=2;
model="Barels.p3d";
displayName="$STR_DN_BARRELS";
transportFuel=400;
};

class Barrel1:BarrelBase
{
scope=2;
model="Barel1.p3d";
displayName="$STR_DN_BARREL_RED";
};

class Barrel2:BarrelBase
{
scope=2;
model="Barel2.p3d";
displayName="$STR_DN_BARREL_BROWN";
};

class Barrel3:BarrelBase
{
scope=2;
model="Barel4.p3d";
displayName="$STR_DN_BARREL_WHITE";
};

class Barrel4:BarrelBase
{
scope=2;
model="Barel3.p3d";
displayName="$STR_DN_BARREL_WHITE";
};


Barrel3................model=Barel4.p3d
and
Barrel4.................model=Barel3.p3d is NOT a mistake


Planck
Title: Re: fragmentaion afetr hit
Post by: DeanosBeano on 20 Jun 2006, 19:52:07
thanks again m8, now i know why i missed this place :).