tightninja
Member
Is it possible to right a script that will give a bbox to fallen enemies? I want to mount fallen enemies and utilize ground attacks, but would hate to have to put a bbox on every fall animation in the game.
Is it possible to right a script that will give a bbox to fallen enemies? I want to mount fallen enemies and utilize ground attacks, but would hate to have to put a bbox on every fall animation in the game.
Is it possible to right a script that will give a bbox to fallen enemies? I want to mount fallen enemies and utilize ground attacks, but would hate to have to put a bbox on every fall animation in the game.
You don't need to declare bbox on fallen enemies for mounting. What you need is script to detect if there is a valid fallen enemy nearby and perform mounting if one is found. Valid condition is pretty complex cause it involves range, enemy health, facing direction just to name a few.
Then you need to code mounting state with attack option and mount timer. It's basically coding custom grabbing system except it's for fallen enemies.
TLDR, it's complex but doable![]()
com D A freespecial30 #down attack

int ani0020(int iAni, int iTAni){
/*
ani0020
Damon Vaughn Caskey
Perform alternate animation if target is within range and in specified animation.
iAni: Alternate attack.
iTAni: Target animation.
*/
void vSelf = getlocalvar("self"); //Caller.
void vOpp = findtarget(vSelf, iAni); //Nearest target in range of alternate attack.
if (vOpp) //Found a target?
{
if(getentityproperty(vOpp, "animationID") == iTAni) //Animation match?
{
ani0009(vSelf, iAni, 0); //Perform alternate attack.
return 1; //Return 1.
}
}
return 0; //Return 0.
}
int ani0009(void vTarget, int iAni, int iType)
{
//Set animation and return 1 if valid.
if (!vTarget) vTarget = getlocalvar("self");
if (getentityproperty(vTarget, "animvalid", iAni)) //Animation valid?
{
if (iType == -1) //Type -1?
{
changeentityproperty(vTarget, "animation", iAni); //Set animation with entity property.
}
else
{
performattack(vTarget, iAni, iType); //Set animation with perform attack command.
}
return 1; //Return 1.
}
return 0;
}


void position(int Frame, float dx, float dy, float dz, int face)
{ // Modify grabbed entity's position relative to grabber
// face 0 - same facing
// face 1 - turn around
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);
}
}
void depost(int Gr)
{// Release grabbed entity
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
bindentity(target, NULL());
if(Gr == 1)
{
int x = getentityproperty(target, "x");
int z = getentityproperty(target, "z");
changeentityproperty(target, "position", x, z, 0);
}
}
}
void throw(int Damage, int Type, int x, int y, int z, int Face)
void finish(int Damage, int Type, int x, int y, int z, int Face)

void slamstart()
{ // Slam Starter
// Use finish after using this
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL80")); // Slam Starter
}
}
void slamstart2()
{ // Slam Starter for nongrab slams
// Use finish or throw after using this
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "opponent");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL80")); // Slam Starter
}
}
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);
}
}
void depost(int Gr)
{// Release grabbed entity
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
bindentity(target, NULL());
if(Gr == 1)
{
int x = getentityproperty(target, "x");
int z = getentityproperty(target, "z");
changeentityproperty(target, "position", x, z, 0);
}
}
}
void hurt2(int Damage)
{ // Damage without altering opponent's animation + less damage if opponent has less health
// Mainly used for slams
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
int THealth = getentityproperty(target,"health"); //Get target's health
int TAniPos = getentityproperty(target,"animpos"); //Get target's animation frame
if(THealth > Damage)
{
damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL80")); // Damage target with desired damage
updateframe(target, TAniPos);
} else {
int Damage2 = THealth - 1;
damageentity(target, self, Damage2, 1, openborconstant("ATK_NORMAL80")); //Damage target with less damage
updateframe(target, TAniPos);
}
}
}
void slamstart()
{ // Slam Starter
// Use finish after using this
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL80")); // Slam Starter
}
}
void slamstart2()
{ // Slam Starter for nongrab slams
// Use finish or throw after using this
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "opponent");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL80")); // Slam Starter
}
}
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);
}
}
void depost(int Gr)
{// Release grabbed entity
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
bindentity(target, NULL());
if(Gr == 1)
{
int x = getentityproperty(target, "x");
int z = getentityproperty(target, "z");
changeentityproperty(target, "position", x, z, 0);
}
}
}
@cmd slamstart2
@cmd position 12 0 0 0 0
frame data/chars/1billy/ffc12.gif
#####-----DUCK
anim freespecial200
loop 1 1 2
delay 8
offset 80 129
bbox.position.x 68
bbox.position.y 124
bbox.size.x 26
bbox.size.y 6
energycost -5 # Charges 5 MP per cycle
mponly 1
cancel 0 3 0 a4 freespecial179 #BREAKIN!
cancel 0 3 0 a freespecial198 #Hyper Upper 198 from super
cancel 0 3 0 a2 freespecial199 #Hyper Knee 199 from super
cancel 0 3 0 s freespecial197 #BLOCK 2
cancel 0 3 0 u freespecial196 #STANDING IDLE
cancel 0 3 0 a3 freespecial170 #MOUNT
cancel 0 3 0 j freespecial36 #FORWARD LEAP
cancel 0 2 0 u u freespecial190 #UP DODGE
cancel 0 2 0 d d freespecial189 #DOWN DODGE
cancel 0 2 0 f f freespecial100 #FWD DODGE
cancel 0 2 0 b b freespecial99 #BACK DODGE
cancel 0 2 0 d f d f a freespecial59 #CVS ISM SUPER ART I
cancel 0 2 0 d f d f a2 freespecial58 #CVS ISM SUPER ART II
cancel 0 2 0 d f d f a4 freespecial86 #ULTRA – MUSICAL
frame data/chars/1billy/fin02.gif
frame data/chars/1billy/dodge.gif
frame data/chars/1billy/dodge.gif
#####-----MOUNT
com d a4 freespecial170
anim freespecial170
loop 0
delay 5
offset 80 129
bbox.position.x 77
bbox.position.y 83
bbox.size.x 24
bbox.size.y 44
energycost 5
mponly 1
cancel 0 1 0 j freespecial36 #FORWARD LEAP
cancel 0 1 0 b a freespecial193 #BACK ELBOW
cancel 0 1 0 b a2 freespecial194 #BACK DOUBLE KICKS
cancel 0 1 0 a freespecial171 #GROUND AND POUNDD
cancel 0 3 0 a2 freespecial172 #STOMP EM IN THE NUTS
cancel 0 3 0 a4 freespecial173 #BILLY KNEE DROP
cancel 0 1 0 f f freespecial100 #FWD DODGE
cancel 0 1 0 b b freespecial99 #BACK DODGE
cancel 0 1 0 u u freespecial190 #UP DODGE
cancel 0 1 0 d d freespecial189 #DOWN DODGE
@cmd slamstart2
frame data/chars/1billy/ffc12.gif
delay 200
sound data/sounds/grab.wav
@cmd position 12 0 0 0 0
frame data/chars/1billy/ffc12.gif
delay 5
@cmd depost 0
@cmd finish 0 0 0 0 0 0
frame data/chars/1billy/ffc12.gif
delay 5
@cmd clearL
frame data/chars/1billy/fin02.gif
I don't know if the MOUNTanimation being a cancel from DUCK animation would affect it. However, I added a com command for the MOUNT animation and it still "warps" the player
Perhaps I need the updated slamstart commands