Actually under the if(isObject(%obj.getMountedImage(1))) you make the mistake of forgetting the opening/closing brackets a stuff ton. You can't do
if(%obj.getMountedImage(1).getName() $= "Infantry_PlateMountedImage")
if(getWord(%pos,2) < getWord(%obj.getWorldBoxCenter(),2) - 3.3*getWord(%obj.getScale(),2))
%damage *= 0.85;
This won't work, it needs to be like
if(%obj.getMountedImage(1).getName() $= "Infantry_PlateMountedImage")
{
if(getWord(%pos,2) < getWord(%obj.getWorldBoxCenter(),2) - 3.3*getWord(%obj.getScale(),2))
%damage *= 0.85;
}
I counted at least 54 instances of this mistake.