R
RetroRic
Guest
Hi Guys,
I've picked up a script on here by Damon Caskey for performing custom slams etc.
This is the code i'm using for this particular throw:
I have managed to implement this and my throw is working well, the attack boxes are activated and enemies get knocked over by the thrown enemy.
The problem i'm having is that I want juggling to be a big part of the mod and for whatever reason the thrown enemy is not completely juggleable. Once an enemy is thrown it is possible to hit this enemy's bbox but his flight path remains unchanged except that the enemy flips direction.
What I'm looking for is a way to make the enemy react just like he's being hit out of the air. I'm not sure if I need to add something to Damon's code or add new code somewhere else to effect this change.
If anyone could shed light on this I would be most greatful.
just incase you need to know the code on the throw animation frame it is this:
@cmd position 0 32 0 0 -1
@cmd depost 0
@cmd throw 30 1 -1 4 0 0
Thanks again.
I've picked up a script on here by Damon Caskey for performing custom slams etc.
This is the code i'm using for this particular throw:
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, 0, 1, openborconstant("ATK_NORMAL5")); // 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_BURN")); // 3rd throw type
}
changeentityproperty(target, "attacking", 1);
changeentityproperty(target, "damage_on_landing", Damage, 1);
changeentityproperty(target, "projectile", 1);
changeentityproperty(target, "direction", MDir);
tossentity(target, y, x, z); // Toss opponent
}
}
I have managed to implement this and my throw is working well, the attack boxes are activated and enemies get knocked over by the thrown enemy.
The problem i'm having is that I want juggling to be a big part of the mod and for whatever reason the thrown enemy is not completely juggleable. Once an enemy is thrown it is possible to hit this enemy's bbox but his flight path remains unchanged except that the enemy flips direction.
What I'm looking for is a way to make the enemy react just like he's being hit out of the air. I'm not sure if I need to add something to Damon's code or add new code somewhere else to effect this change.
If anyone could shed light on this I would be most greatful.
just incase you need to know the code on the throw animation frame it is this:
@cmd position 0 32 0 0 -1
@cmd depost 0
@cmd throw 30 1 -1 4 0 0
Thanks again.