dantedevil
Well-known member
These days I find testing my mod before launching the new demo.
Normally always I am testing alone, but this time I'm playing with my daughter Carolina.
Then I found a curious bug with the script "damage all enemies".
Here the script:
The bug only occurs when more than one player playing.
1- When an enemy grab a player with a script slam
2- The other player make the attack "damage all enemies"
3- The "damage all enemies" hit the enemy before finish the script slam over the other player.
4- The enemy fall but the player get stuck with the enemy.
So to solve this the enemies need immunity to "damage all enemies" during all the script slam or throw movements.
Maybe the script need an update , the best is add an exception to avoid damage enemies during a script slam.
Normally always I am testing alone, but this time I'm playing with my daughter Carolina.
Then I found a curious bug with the script "damage all enemies".
Here the script:
Code:
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"));
if(getentityproperty(vEntity, "type")==openborconstant("TYPE_enemy") && Def != 0)
{
damageentity(vEntity,self,damage,drop,openborconstant(atk_type));
changeentityproperty(vEntity, "staydown", "riseattack", stay);
}
}
}
The bug only occurs when more than one player playing.
1- When an enemy grab a player with a script slam
2- The other player make the attack "damage all enemies"
3- The "damage all enemies" hit the enemy before finish the script slam over the other player.
4- The enemy fall but the player get stuck with the enemy.
So to solve this the enemies need immunity to "damage all enemies" during all the script slam or throw movements.
Maybe the script need an update , the best is add an exception to avoid damage enemies during a script slam.