void cparent(int Anim)



{
 
   
     
     void self         = getlocalvar("self"); //Get calling entity.
     void parent       = getentityproperty(self, "parent");
     void parentname   = getentityproperty(parent, "name");
     void phealth      = getentityproperty(parent, "health");
              

              if(phealth > 0)
               {
        
     
     changeentityproperty(parent, "animation", openborconstant(Anim));
     
               }
     
     
}