Aerisetta
Active member
Hello
I am making an entity that will spawn as a "combo finisher" and the finisher that comes out will be based on the current RUSH_COUNT of the player who spawned it
The below code works if it is in the attack animation of the player, however I need the entity to get the player and check the RUSH_COUNT of the player. My game only has 1 player. NOTE the player does not spawn this, the enemy that is getting hit does.
Can someone help me?
EDIT: Actually the enemy spawns this, so actually it needs to find the player, not whoever spawned it
I am making an entity that will spawn as a "combo finisher" and the finisher that comes out will be based on the current RUSH_COUNT of the player who spawned it
The below code works if it is in the attack animation of the player, however I need the entity to get the player and check the RUSH_COUNT of the player. My game only has 1 player. NOTE the player does not spawn this, the enemy that is getting hit does.
Can someone help me?
EDIT: Actually the enemy spawns this, so actually it needs to find the player, not whoever spawned it
Code:
anim idle
@script
if(frame==0){
void self = getlocalvar("self");
int hits = getentityproperty(self, "rush_count");
if(hits >= 30){
performattack(self, openborconstant("ANI_FOLLOW50"));
} else if(hits >= 25){
performattack(self, openborconstant("ANI_FOLLOW50"));
} else if(hits >= 20){
performattack(self, openborconstant("ANI_FOLLOW50"));
} else if(hits >= 15){
performattack(self, openborconstant("ANI_FOLLOW50"));
} else if(hits >= 12){
performattack(self, openborconstant("ANI_FOLLOW50"));
} else if(hits >= 9){
performattack(self, openborconstant("ANI_FOLLOW40"));
} else if(hits >= 6){
performattack(self, openborconstant("ANI_FOLLOW30"));
} else if(hits >= 3){
performattack(self, openborconstant("ANI_FOLLOW20"));
} else if(hits == 0){
performattack(self, openborconstant("ANI_FOLLOW10"));
}
}
@end_script
Last edited:
