Hi all!
I made an "Explosion" function wich its suppoused to damage creatures and placeables...
void ExplosionL(int nDam, location lL, float nT)
{
effect eDam;
effect eDam2;
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, nT, lL, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE);
int nD = d20(1)+d10(nDam);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIREBALL), lL);
while (GetIsObjectValid(oTarget))
{
nD= GetReflexAdjustedDamage(nD, oTarget, 15, SAVING_THROW_TYPE_FIRE);
eDam = EffectDamage(nD/2, DAMAGE_TYPE_FIRE);
eDam2 = EffectDamage(nD/2, DAMAGE_TYPE_BLUDGEONING);
if(nD > 0)
{
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget));
}
nD = d20(1)+d10(nDam);
oTarget = GetNextObjectInShape(SHAPE_SPHERE, nT, lL, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE);
}
}
It works only for creatures, its not damaging placeables... why? The placeables are destroyable cause i tried with a normal fireball and they are destroyed... but not with this script.. :/