void limiter(int Limit)
{
   // Prevents hero from performing the animation if his/her health is less than Limit
    void self = getlocalvar("self");
    void mp = getentityproperty(self,"mp"); //Get entity's HP.

   if(mp<=Limit) // Don't have enough HP?
   {
     changeentityproperty(self, "animation", openborconstant("ANI_idle")); //Don't play the animation.
   }
}

































		