Aller au contenu

Photo

Why placeables are not taking damage?


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Nebril2

Nebril2
  • Members
  • 59 messages

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.. :/



#2
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

I just tested it and it does work for objects for me. Only thing I can think of off the top of my head is that the objects are either checked static or plot, maybe they have a high reflex save set to them which is making them avoid the damage, or the objects in question are taking the damage but not enough to be destroyed? In testing I set nDam to 100.



#3
WhiZard

WhiZard
  • Members
  • 1 204 messages

... maybe they have a high reflex save set to them which is making them avoid the damage...

 

Placeables always fail saving throws.


  • GhostOfGod aime ceci

#4
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

Placeables always fail saving throws.

Oh yeah. Well that's just silly that they have the reflex save field that you can edit and it's pointless. I forgot about that. Thanks for the reminder.



#5
Verilazic

Verilazic
  • Members
  • 162 messages

Placeables always fail saving throws.

I actually didn't know this. What's the point to having those save fields then? Were they just not implemented? I bet you could script in some sort of usage...



#6
WhiZard

WhiZard
  • Members
  • 1 204 messages

I actually didn't know this. What's the point to having those save fields then? Were they just not implemented? I bet you could script in some sort of usage...

 

The only usage BioWare gets out of these fields is to use them as local variables for its secret door mechanics.