staydown in @cmd throw

dantedevil

Well-known member
Hello!

I try to find a solution for this but still can't.

Here the script:

Code:
    void throw(int Damage, int Type, int x, int y, int z, int Face, int Stay)
    { // Damage as throw finisher
       void self = getlocalvar("self");
       void target = getlocalvar("Target" + self);
       int SDir = getentityproperty(target,"direction");
       int MDir;

       if(Face==0){ // Same facing?
           MDir = SDir;
       }

       if(Face==1){ // Opposite facing?

         if(SDir==0){ // Facing left?
           MDir = 1;
         } else { MDir = 0;}
       }

       if(target==NULL())
       {
         target = getentityproperty(self, "grabbing");
         setlocalvar("Target" + self, target);
       }
       if(target!=NULL())
       {
         int dir = getentityproperty(target,"direction"); //Get opponent's facing direction
         if(dir==0){ // Facing left?
           x = -x;
         }

         if(Type==1)
         {
           damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL")); // 1st throw type
         }

         if(Type==2)
         {
           damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL9")); // 2nd throw type
         }

         if(Type==3)
         {
           damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL2")); // 3rd throw type, enemies can autoland here
         }

         changeentityproperty(target, "attacking", 1);
         changeentityproperty(target, "damage_on_landing", Damage);
         changeentityproperty(target, "projectile", 1);
         changeentityproperty(target, "direction", MDir);
         changeentityproperty(target, "staydown", "rise", Stay);
         tossentity(target, y, x, z); // Toss opponent ;)
       }
    }

Testing the @cmd throw , i set:  @cmd    throw 25 2 -3 -0.2 0 1 15
If i dont set the last number, the OpenBor crashes.
The last number is for staydown, but dont work.

 
Back
Top Bottom