Attackoff script

PS_VITA

Active member
Hello guys,

What would I need to change in the script below to make sure it works against enemies or is it ready to be used against enemies?

Below I found a script in the double dragon reloaded game that is used to make an enemy release the player if he happens to get hit by another enemy while being grabbed.

      Alright, here's the function:

void attackoff()
{// Cancels attack if targetted player is fallen on ground
    void self = getlocalvar("self");
    void target = findtarget(self); //Get nearest player

    if(target!=NULL()){
      void PAnim = getentityproperty(target, "animationID");

      if(PAnim == openborconstant("ANI_FALL") || PAnim == openborconstant("ANI_RISE")){
        setidle(self, openborconstant("ANI_IDLE"));
      }
    }
}   

I'm basically trying to create a coop move where player 1 or 2 grab an enemy and they are able to punch or knock them down while p1 or p2 grab the enemy.

If anyone knows of any exqmples I can learn from please let me know.
 
Back
Top Bottom