Hit point script gone Awry

The script in question is currently being handled by OnDamaged()
At about 25% of health, I have two skeletons is that puffs up with his taunt anim and then spawns in a lesser skeleton.
First off, anytime the PC attacks said skeletons, they start the spawn sequence way ahead of time. Definitely not down to 25% when they spawn. They spawn on the first hit.
I’ve tried using OnPhysicallyAttacked() as well.
So, I’m a little miffed.

Code so far:

void main()
{
object oPC  =  GetLastDamager();
    if (!GetIsPC(oPC)) return;

    int nMaxHP = GetMaxHitPoints();
    int nCurHP = GetCurrentHitPoints();
    int nRatio = (100* nCurHP)/nMaxHP;


    if ( nRatio >= 25 )
    {
        object oSound = GetNearestObjectByTag("SKELETON_SCREECH");

        ClearAllActions();
        ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT);
        SoundObjectPlay(oSound);

        object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "skeleton001", GetLocation(oPC));


        DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect
        ( VFX_FNF_GAS_EXPLOSION_NATURE ), oSpawn));
    }
}

Shouldn’t it be (nRatio <= 25)?

Missed that. You are absolutely right. Thanks…

I think you’ll need a DO_ONCE variable set up in the skeletons so it only happens once.
As it is, the script will run every time the skeletons get hit and are below 25% HP.

if ( nRatio <= 25  && GetLocalInt (OBJECT_SELF, "DO_ONCE") == 0) 
{
    SetLocalInt (OBJECT_SELF, "DO_ONCE", 1);
   ...

Something like that