anim follow27 #Billy's intro
@script
void self = getlocalvar("self");
int iMax = openborvariant("count_entities");
int Dir = getentityproperty(self, "direction");
int i;
for(i=0; i<iMax; i++){
void ally = getentity(i);
char AName = getentityproperty(ally, "name");
void AAni = getentityproperty(ally, "animationID");
int ADir = getentityproperty(ally, "direction");
if(AName=="Jimmy" && ADir==0 && AAni==openborconstant("ANI_FOLLOW27")){ //intro1
int Disx = getRange(self, ally, "x", 0);
int Disz = getRange(self, ally, "z", 0);
int Ay = getentityproperty(ally, "y");
if(Dir==1 && Disx <= 270 && Disz <= 90 && Ay >= 0 && Ay < 470){
performattack(ally, openborconstant("ANI_ATTACK8")); //jimmy does stuff
changeentityproperty(self, "direction", 1);
performattack(self, openborconstant("ANI_ATTACK7")); //billy does stuff
} else {
if(Dir==0 && Disx <= 270 && Disz <= 90 && Ay >= 0 && Ay < 470){
performattack(ally, openborconstant("ANI_ATTACK8")); // same stuff but other direction
changeentityproperty(self, "direction", 1);
performattack(self, openborconstant("ANI_ATTACK7"));
break;
}
}
}
if(AName=="Jimmy" && ADir==1 && AAni==openborconstant("ANI_FOLLOW27")){
int Disx = getRange(self, ally, "x", 0);
int Disz = getRange(self, ally, "z", 0);
int Ay = getentityproperty(ally, "y");
if(Dir==0 && Disx <= 270 && Disz <= 90 && Ay >= 0 && Ay < 470){
changeentityproperty(self, "direction", 0);
performattack(ally, openborconstant("ANI_ATTACK8"));
performattack(self, openborconstant("ANI_ATTACK7"));
} else {
if(Dir==1 && Disx <= 270 && Disz <= 90 && Ay >= 0 && Ay < 470){
performattack(ally, openborconstant("ANI_ATTACK8"));
changeentityproperty(self, "direction", 0);
performattack(self, openborconstant("ANI_ATTACK7"));
break;
}
}
}
}
@end_script
offset 162 202
delay 17
frame data/chars/billy/109.png
frame data/chars/billy/108.png
frame data/chars/billy/paina01.png
frame data/chars/billy/turn01.png