Solved This is a slam script related question.

Question that is answered or resolved.

DD Tokki

Well-known member
1.PNG

When the player character grabs an enemy and attempts a slam
The player character has an attack box that can damage enemies, and the boss is the moment when the stage is cleared by the player's skill.

At this time, as the boss is defeated, the surrounding enemies are also forcibly cleared.
The problem is that enemies that are caught by the player change into a Fall motion while being caught even before the catching motion is finished.
To make it look natural, when the player's attacking motion is over (landing) and the enemy is knocked down, it should look natural. I want to know how to solve this.
 
  • Like
Reactions: NED

The problem I thought was done seems less resolved.
Last time, if the enemy caught by the player died at once, but there is still health left, the game continues even after the boss dies.
 

The problem I thought was done seems less resolved.
Last time, if the enemy caught by the player died at once, but there is still health left, the game continues even after the boss dies.
If I'm not wrong there's a variable to indicate that the boss is dead, and then another line will kill the grabbed enemy when the throw/slam ends in case the variable "bossDead" is positive. You may forgot some step in this aspect.
 
Code:
icon                data/sprites/sprite/chara/rugal/icon-b.gif
icondie                data/sprites/sprite/chara/rugal/icon-b-lose.gif
diesound             data/sounds/se/rugal/vc-lose.wav
animationscript     data/scripts/script.c
ondeathscript         data/scripts/ondeath.c
takedamagescript    data/scripts/edgeLock.c
onblockwscript         data/scripts/wallbons.c
onblocksscript         data/scripts/wallbons.c

Code:
void main()
{
    setglobalvar("bossDead", 1);
}

"ondeathscript" has been applied to Rugal and the number below is set to "1". I would like to know if there is anything else I need.
 
Code:
icon                data/sprites/sprite/chara/rugal/icon-b.gif
icondie                data/sprites/sprite/chara/rugal/icon-b-lose.gif
diesound             data/sounds/se/rugal/vc-lose.wav
animationscript     data/scripts/script.c
ondeathscript         data/scripts/ondeath.c
takedamagescript    data/scripts/edgeLock.c
onblockwscript         data/scripts/wallbons.c
onblocksscript         data/scripts/wallbons.c

Code:
void main()
{
    setglobalvar("bossDead", 1);
}

"ondeathscript" has been applied to Rugal and the number below is set to "1". I would like to know if there is anything else I need.
I would like to see the void finish script, the line that kills the grabbed enemy must be placed there. And please, post this slam move too.
 
I would like to see the void finish script, the line that kills the grabbed enemy must be placed there. And please, post this slam move too.
Code:
void finish(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam 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, Damage, 1, openborconstant("ATK_NORMAL"));
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL5"));
     }

     if(Type==3)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL6"));
     }

     if(Type==4)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL7"));
     }

     if(Type==5)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL8"));
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);

     setlocalvar("Target"+self, NULL()); //Clears variable
     changeentityproperty(target, "type", openborconstant("TYPE_ENEMY"));
   }
}

Code:
anim    grabup
@script
    void self = getlocalvar("self");

    if(frame==0){
      changelevelproperty("scrollspeed", 0);
    }
    @end_script
    loop    0
    attackone    0
    fastattack    1
    jumpframe    2 8.8 -0.6
    landframe        6     
    quakeframe    6 16 -8
    delay    20
    offset    45 120
    @cmd    spawnbind "timer2" 0 100 1
    @cmd    degravity    -2
    @cmd    slamstart2
    @cmd    position 33 50 5 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-01.gif
    delay    6
    offset    55 127
    @cmd    position 9 36 25 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-02.gif
    delay    1
    offset    51 139
    sound    data/sounds/jump.wav
    @cmd    shoot "dust" 0 0 0
    @cmd    position 9 42 55 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-03.gif
    delay    30
    sound    data/sounds/se/griffon/vc-at2.wav
    @cmd    position 9 42 55 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-03.gif
    delay    12
    offset    49 115
    @cmd    position 11 -35 50 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-04.gif
    delay    999
    offset    54 121
    attack    -6 42 120 80 1142 1 1 0 30 30
    hitflash    flash-strong
    hitfx    data/sounds/se/misc/flash-finish1.wav
    dropv    2.8 3.2 0
    forcedirection    0     
    @cmd    position 13 -45 -54 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-05.gif
    delay    2
    offset    50 103
    sound    data/sounds/se/misc/flash-finish1.wav
    attack    -10 24 120 80 1142 1 1 0 30 30
    dropv    2.8 3.2 0
    forcedirection    0
    @cmd    position 13 -44 -55 0 1
    @cmd    shoot "flash-strong" -53 0 0
    @cmd    hurt2 42
    @cmd    shoot "dust" -53 0 0
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    delay    24
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    delay    8
    offset    50 116
    @cmd    position 13 -44 10 0 1
    @cmd    anti
    @cmd    depost 0
    @cmd    finish 1 3 -1 4 0 1
    @cmd    clearL
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-07.gif
 
Code:
void finish(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam 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, Damage, 1, openborconstant("ATK_NORMAL"));
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL5"));
     }

     if(Type==3)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL6"));
     }

     if(Type==4)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL7"));
     }

     if(Type==5)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL8"));
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);

     setlocalvar("Target"+self, NULL()); //Clears variable
     changeentityproperty(target, "type", openborconstant("TYPE_ENEMY"));
   }
}

Code:
anim    grabup
@script
    void self = getlocalvar("self");

    if(frame==0){
      changelevelproperty("scrollspeed", 0);
    }
    @end_script
    loop    0
    attackone    0
    fastattack    1
    jumpframe    2 8.8 -0.6
    landframe        6   
    quakeframe    6 16 -8
    delay    20
    offset    45 120
    @cmd    spawnbind "timer2" 0 100 1
    @cmd    degravity    -2
    @cmd    slamstart2
    @cmd    position 33 50 5 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-01.gif
    delay    6
    offset    55 127
    @cmd    position 9 36 25 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-02.gif
    delay    1
    offset    51 139
    sound    data/sounds/jump.wav
    @cmd    shoot "dust" 0 0 0
    @cmd    position 9 42 55 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-03.gif
    delay    30
    sound    data/sounds/se/griffon/vc-at2.wav
    @cmd    position 9 42 55 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-03.gif
    delay    12
    offset    49 115
    @cmd    position 11 -35 50 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-04.gif
    delay    999
    offset    54 121
    attack    -6 42 120 80 1142 1 1 0 30 30
    hitflash    flash-strong
    hitfx    data/sounds/se/misc/flash-finish1.wav
    dropv    2.8 3.2 0
    forcedirection    0   
    @cmd    position 13 -45 -54 0 1
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-05.gif
    delay    2
    offset    50 103
    sound    data/sounds/se/misc/flash-finish1.wav
    attack    -10 24 120 80 1142 1 1 0 30 30
    dropv    2.8 3.2 0
    forcedirection    0
    @cmd    position 13 -44 -55 0 1
    @cmd    shoot "flash-strong" -53 0 0
    @cmd    hurt2 42
    @cmd    shoot "dust" -53 0 0
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    delay    24
    attack    0 0 0 0 0 0 0 0 0 0
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-06.gif
    delay    8
    offset    50 116
    @cmd    position 13 -44 10 0 1
    @cmd    anti
    @cmd    depost 0
    @cmd    finish 1 3 -1 4 0 1
    @cmd    clearL
    frame    data/sprites/sprite/chara/griffon/grab-attack-up-07.gif
It seems that you modified the void finish script I applied in the Chinnen character before. Please, test this one below:

C:
void finish(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam 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;
     }
   
     //CHECK IF THE BOSS IS ALREADY DEAD
     //IF YES, DAMAGE THE GRABBED ENTITY WITH ALL HIS HEALTH REMAINING
     if(getglobalvar("bossDead")==1)
     {
       Damage = getentityproperty(target, "health");
     }

     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL"));
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL5"));
     }

     if(Type==3)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL6"));
     }

     if(Type==4)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL7"));
     }

     if(Type==5)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL8"));
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);

     setlocalvar("Target"+self, NULL()); //Clears variable
     changeentityproperty(target, "type", openborconstant("TYPE_ENEMY"));
   }
}

And don't forget to reset the "bossDead" variable to NULL() when any new level starts inside the level.c event.
 
It seems that you modified the void finish script I applied in the Chinnen character before. Please, test this one below:

C:
void finish(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam 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;
     }
  
     //CHECK IF THE BOSS IS ALREADY DEAD
     //IF YES, DAMAGE THE GRABBED ENTITY WITH ALL HIS HEALTH REMAINING
     if(getglobalvar("bossDead")==1)
     {
       Damage = getentityproperty(target, "health");
     }

     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL"));
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL5"));
     }

     if(Type==3)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL6"));
     }

     if(Type==4)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL7"));
     }

     if(Type==5)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL8"));
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);

     setlocalvar("Target"+self, NULL()); //Clears variable
     changeentityproperty(target, "type", openborconstant("TYPE_ENEMY"));
   }
}

And don't forget to reset the "bossDead" variable to NULL() when any new level starts inside the level.c event.
bor - 0011.png

It works fine now. thank you
Bosses and subsequent enemies captured by the player are also defeated.
 

Code:
void position(int Frame, float dx, float dy, float dz, int face)
{ // Modify grabbed entity's position relative to grabber
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "grabbing");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     updateframe(target, Frame);
     bindentity(target, self, dx, dz, dy, face, 0);
     changeentityproperty(target, "type", openborconstant("TYPE_NPC"));
   }
}


Code:
void finishE(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam 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;
     }
  
     //CHECK IF THE BOSS IS ALREADY DEAD
     //IF YES, DAMAGE THE GRABBED ENTITY WITH ALL HIS HEALTH REMAINING
     if(getglobalvar("bossDead")==1)
     {
       Damage = getentityproperty(target, "health");
     }

     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL"));
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL5"));
     }

     if(Type==3)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL6"));
     }

     if(Type==4)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL7"));
     }

     if(Type==5)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL8"));
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);

     setlocalvar("Target"+self, NULL()); //Clears variable
     changeentityproperty(target, "type", openborconstant("TYPE_ENEMY"));
   }
}

I have another problem.
When a player kills a boss with only grab skills, the boss is a "type NPC" and then comes back as a "type enemy", but the boss seems to be of the "Enemy" type instead of "Boss". It's the same as when a normal enemy dies.
 

Code:
void position(int Frame, float dx, float dy, float dz, int face)
{ // Modify grabbed entity's position relative to grabber
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "grabbing");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     updateframe(target, Frame);
     bindentity(target, self, dx, dz, dy, face, 0);
     changeentityproperty(target, "type", openborconstant("TYPE_NPC"));
   }
}


Code:
void finishE(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam 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;
     }
 
     //CHECK IF THE BOSS IS ALREADY DEAD
     //IF YES, DAMAGE THE GRABBED ENTITY WITH ALL HIS HEALTH REMAINING
     if(getglobalvar("bossDead")==1)
     {
       Damage = getentityproperty(target, "health");
     }

     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL"));
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL5"));
     }

     if(Type==3)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL6"));
     }

     if(Type==4)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL7"));
     }

     if(Type==5)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL8"));
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);

     setlocalvar("Target"+self, NULL()); //Clears variable
     changeentityproperty(target, "type", openborconstant("TYPE_ENEMY"));
   }
}

I have another problem.
When a player kills a boss with only grab skills, the boss is a "type NPC" and then comes back as a "type enemy", but the boss seems to be of the "Enemy" type instead of "Boss". It's the same as when a normal enemy dies.
You need to change the type before damaging the opponent, not after, otherwise the target will receive the damage as NPC. I remember that I made this way in the previous file you sent, but this one looks different.
In addition, I recommend to reduce the code a bit and make only one damageentity line, like the example below.

C:
void finishE(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam finisher
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);
   void atkType;
   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;
     }
 
     //CHECK IF THE BOSS IS ALREADY DEAD
     //IF YES, DAMAGE THE GRABBED ENTITY WITH ALL HIS HEALTH REMAINING
     if(getglobalvar("bossDead")==1)
     {
       Damage = getentityproperty(target, "health");
     }

     if(Type==1)
     {
       atkType = openborconstant("ATK_NORMAL"));
     }

     if(Type==2)
     {
       atkType = openborconstant("ATK_NORMAL5"));
     }

     if(Type==3)
     {
       atkType = openborconstant("ATK_NORMAL6"));
     }

     if(Type==4)
     {
       atkType = openborconstant("ATK_NORMAL7"));
     }

     if(Type==5)
     {
       atkType = openborconstant("ATK_NORMAL8"));
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);
     changeentityproperty(target, "type", openborconstant("TYPE_ENEMY"));
     damageentity(target, self, Damage, 1, atkType);
     setlocalvar("Target"+self, NULL()); //Clears variable
   }
}
 
You need to change the type before damaging the opponent, not after, otherwise the target will receive the damage as NPC. I remember that I made this way in the previous file you sent, but this one looks different.
In addition, I recommend to reduce the code a bit and make only one damageentity line, like the example below.

C:
void finishE(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam finisher
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);
   void atkType;
   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;
     }
 
     //CHECK IF THE BOSS IS ALREADY DEAD
     //IF YES, DAMAGE THE GRABBED ENTITY WITH ALL HIS HEALTH REMAINING
     if(getglobalvar("bossDead")==1)
     {
       Damage = getentityproperty(target, "health");
     }

     if(Type==1)
     {
       atkType = openborconstant("ATK_NORMAL"));
     }

     if(Type==2)
     {
       atkType = openborconstant("ATK_NORMAL5"));
     }

     if(Type==3)
     {
       atkType = openborconstant("ATK_NORMAL6"));
     }

     if(Type==4)
     {
       atkType = openborconstant("ATK_NORMAL7"));
     }

     if(Type==5)
     {
       atkType = openborconstant("ATK_NORMAL8"));
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);
     changeentityproperty(target, "type", openborconstant("TYPE_ENEMY"));
     damageentity(target, self, Damage, 1, atkType);
     setlocalvar("Target"+self, NULL()); //Clears variable
   }
}
Changing this code will cause the game to close. There seems to be something wrong with the application of the game.
 
Changing this code will cause the game to close. There seems to be something wrong with the application of the game.
Can you post the log file?

EDIT: Sorry, I found where are the problem and fixed it.

C:
void finishE(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam finisher
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);
   void atkType;
   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;
     }
 
     //CHECK IF THE BOSS IS ALREADY DEAD
     //IF YES, DAMAGE THE GRABBED ENTITY WITH ALL HIS HEALTH REMAINING
     if(getglobalvar("bossDead")==1)
     {
       Damage = getentityproperty(target, "health");
     }

     if(Type==1)
     {
       atkType = openborconstant("ATK_NORMAL");
     }

     if(Type==2)
     {
       atkType = openborconstant("ATK_NORMAL5");
     }

     if(Type==3)
     {
       atkType = openborconstant("ATK_NORMAL6");
     }

     if(Type==4)
     {
       atkType = openborconstant("ATK_NORMAL7");
     }

     if(Type==5)
     {
       atkType = openborconstant("ATK_NORMAL8");
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);
     changeentityproperty(target, "type", openborconstant("TYPE_ENEMY"));
     damageentity(target, self, Damage, 1, atkType);
     setlocalvar("Target"+self, NULL()); //Clears variable
   }
}
 
Back
Top Bottom