O Ilusionista
Captain 100K
Hi guys, I am having an issue here.
I am using scripted slams (BB's method) but the throw/slam/finish aren't working thanks to a conflict with defense.
My enemy has this at defense:
After some tests, I figures that BB's code doesn't care for knockdowncount, and if you grab someone they won't do the custom animations unless the damage is enough, which bugs everything. So I modified it to be able to do it, and its works.
But...when you try to use slam/throw/finish, the target won't go to the desired animation, getting stuck on previous animation. The move starts with fall7 animation and should go to a specific animation (see bellow), but that animation is been ignored.
This is my code:
Any ideas?
I am using scripted slams (BB's method) but the throw/slam/finish aren't working thanks to a conflict with defense.
My enemy has this at defense:
So he will just go to pain animation if the damage is 25 or more, and you need a power of 5 or more to be able to knock it down.defense all 0.45 25 1 25 25
knockdowncount 5
After some tests, I figures that BB's code doesn't care for knockdowncount, and if you grab someone they won't do the custom animations unless the damage is enough, which bugs everything. So I modified it to be able to do it, and its works.
But...when you try to use slam/throw/finish, the target won't go to the desired animation, getting stuck on previous animation. The move starts with fall7 animation and should go to a specific animation (see bellow), but that animation is been ignored.
This is my code:
void throw(int Damage, int Type, int x, int y, int z, int Face)
{ // 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, 100, 100, openborconstant("ATK_NORMAL")); // 1st throw type
}
if(Type==2)
{
damageentity(target, self, 100, 100, openborconstant("ATK_NORMAL9")); // 2nd throw type
}
if(Type==3)
{
damageentity(target, self, 100, 100, openborconstant("ATK_NORMAL2")); // 3rd throw type
}
if(Type==4)
{
damageentity(target, self, 100, 100, openborconstant("ATK_SHOCK")); // 4rd throw type
}
if(Type==5)
{
damageentity(target, self, 100, 100, openborconstant("ATK_NORMAL11")); // 4rd throw type
}
changeentityproperty(target, "attacking", 1);
changeentityproperty(target, "damage_on_landing", Damage);
changeentityproperty(target, "projectile", 1);
changeentityproperty(target, "direction", MDir);
tossentity(target, y, x, z); // Toss opponent
}
}
By the way, Drop is the knockdown power, but what Force means?damageentity(entity, other, force, drop, type)
Any ideas?