msmalik681 said:as a total guess you could try to add a keyscript when A4 is hit during a run check for any players in range if yes and they are stunned preform variation else preform normal attack.
void dizzdetc(void Ani , int RxMin, int RxMax, int Rz)
{// Checks closest enemy's animation & range
// If it's accepted, perform custom attack (ajout de differents "dizzy") - (les ajouter tous!!!) NE BINDE PAS a l'enemi
/*Originally smartbomb by
Damon Vaughn Caskey
07152008*/
void self = getlocalvar("self"); //Caller.
float x = getentityproperty(self, "x");
float z = getentityproperty(self, "z");
float b = getentityproperty(self, "base");
void vEntity; //Target entity placeholder.
int iEntity; //Entity enumeration holder.
int iType; //Entity type.
int iMax = openborvariant("ent_max"); //Entity count.
//Enumerate and loop through entity collection.
for(iEntity=0; iEntity<iMax; iEntity++){
vEntity = getentity(iEntity); //Get target entity from current loop.
iType = getentityproperty(vEntity, "type"); //Get target type.
//Enemy type?
if (iType == openborconstant("TYPE_ENEMY")){
float Tx = getentityproperty(vEntity, "x");
float Ty = getentityproperty(vEntity, "a");
float Tz = getentityproperty(vEntity, "z");
void EAnim = getentityproperty(vEntity, "animationID");
int EHealth = getentityproperty(vEntity, "health");
if( (EAnim == openborconstant("ANI_PAIN32") || EAnim == openborconstant("ANI_PAIN33") || EAnim == openborconstant("ANI_FOLLOW1")) && Ty == b && EHealth > 0){
float Disx = Tx - x;
float Disz = Tz - z;
if(Disz < 0){
Disz = -Disz;
}
if( (Disx >= RxMin && Disx <= RxMax && Disz <= Rz) || (Disx >= -RxMax && Disx <= -RxMin && Disz <= Rz)){
performattack(self, openborconstant(Ani));
}
}
}
}
}
Damon Caskey said:I actually wrote a function for Mr. Q specifically to do what you are asking. I'll see if I can dig it up for you.
DC
I would totally use this script, but It can't allow multiple pain anim detect to activate :-\magggas said:Exactly this can do the ani0020.h script which i think he is already using![]()
#include "data/scripts/ani0009.h"
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.
}
anim freespecial18
damageonlanding 0 1
forcedirection -1
jugglecost 6
subentity dus
spawnframe 3 0
loop 0
delay 5
offset 96 177
#CANCEL TO DIZZY RUN ATTACK (optional)
# @cmd dizzdetc "ANI_FREESPECIAL59" -65 110 10#-65 65 10#xmin/xmax /zwidth(up-dwn)(OLD)
@cmd ani0020 openborconstant("ANI_FREESPECIAL59") openborconstant("ANI_PAIN32")#P1 go to (X), if enemy is (X)
@cmd ani0020 openborconstant("ANI_FREESPECIAL59") openborconstant("ANI_PAIN33")#P1 go to (X), if enemy is (X)
@cmd ani0020 openborconstant("ANI_FREESPECIAL59") openborconstant("ANI_FOLLOW1")#P1 go to (X), if enemy is (X)
bbox 72 80 48 98
...
...
...