Something was odd, I have tried all of this, yet it does not work, I try this:
while((%target = containerSearchNext()) != 0)
{
if(%target.getState() !$= "Dead")
if(%target != %this)
%searchObjsGroup[%searchObjs++] = %target;
}
if(%searchObjs > 0)
{
for(%i=0;%i<%searchObjs;%i++)
{
%target = %searchObjsGroup[%i];
if(isObject(%target))
{
%target.spawnExplosion(vehicleFinalExplosionProjecti le,getWord(%target.getScale(),2));
%target.addHealth(-2500);
}
}
}
This works on all the objects around me, when I also took the spawnExplosion and the addHealth event out, it searched them all..