Author Topic: Why placeables are not taking damage?  (Read 330 times)

Legacy_Nebril2

  • Full Member
  • ***
  • Posts: 104
  • Karma: +0/-0
Why placeables are not taking damage?
« on: January 10, 2015, 04:24:03 pm »


               

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



               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Why placeables are not taking damage?
« Reply #1 on: January 11, 2015, 01:37:19 am »


               

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.



               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Why placeables are not taking damage?
« Reply #2 on: January 12, 2015, 02:44:49 am »


               


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




 


Placeables always fail saving throws.


               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Why placeables are not taking damage?
« Reply #3 on: January 14, 2015, 01:24:31 am »


               


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.


               
               

               
            

Legacy_Verilazic

  • Sr. Member
  • ****
  • Posts: 263
  • Karma: +0/-0
Why placeables are not taking damage?
« Reply #4 on: January 20, 2015, 10:18:55 pm »


               


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


               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Why placeables are not taking damage?
« Reply #5 on: January 20, 2015, 11:59:06 pm »


               


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.