dantedevil
Well-known member
I found a bug using this script:
The problem comes when the enemies have a weapon. All weapons have type none, so the script not affect this enemies and this looks really bad.
void damage_all_enemies(int damage, int drop, int stay, void atk_type)
{
int iEntity;
void vEntity;
void self = getlocalvar("self");
int iMax = openborvariant("ent_max");
int Def;
for(iEntity=0; iEntity<iMax; iEntity++)
{
vEntity = getentity(iEntity);
Def = getentityproperty(vEntity, "defense", openborconstant("ATK_NORMAL4"));
void EAnim = getentityproperty(vEntity, "animationID");
if(getentityproperty(vEntity, "type")==openborconstant("TYPE_enemy") && Def != 0 && EAnim != openborconstant("ANI_FALL7"))
{
damageentity(vEntity,self,damage,drop,openborconstant(atk_type));
changeentityproperty(vEntity, "staydown", "riseattack", stay);
}
}
}
The problem comes when the enemies have a weapon. All weapons have type none, so the script not affect this enemies and this looks really bad.