cancelgrab revert to... freespecial?

dantedevil

Well-known member
Hello!

Its any way to make the hero shows a specific reaction when the grab is canceled for this script?

That is, instead of showing idle, show anim freespecial15.

Here's the anti-certain-boss script (courtesy of Bloddbane) :

    @cmd cancelgrab

Code:
 void cancelgrab()
        {// Check grabbed opponent's name
        // If it's forbidden to grab him/her, revert to IDLE
           void self = getlocalvar("self");
           void target = getlocalvar("Target" + self);

           if(target==NULL())
           {
             target = getentityproperty(self, "opponent");
             setlocalvar("Target" + self, target);
           }
           if(target!=NULL())
           {
             char Tname = getentityproperty(target, "defaultname");

             if(Tname == "Goro" || Tname == "Kintaro" || Tname == "Motaro" || Tname == "Kimokahn")
             {
               setidle(self);
             }
           }
        }

Thanks!
 
I wondered if you ask about this :)

Anyways,

void cancelgrab()
        {// Check grabbed opponent's name
        // If it's forbidden to grab him/her, revert to IDLE
          void self = getlocalvar("self");
          void target = getlocalvar("Target" + self);

          if(target==NULL())
          {
            target = getentityproperty(self, "opponent");
            setlocalvar("Target" + self, target);
          }
          if(target!=NULL())
          {
            char Tname = getentityproperty(target, "defaultname");

            if(Tname == "Goro" || Tname == "Kintaro" || Tname == "Motaro" || Tname == "Kimokahn")
            {
                changeentityproperty(self, "animation", openborconstant("ANI_FREESPECIAL15"));
            }
          }
        }
 
Back
Top Bottom