Reply to Re: attacking
If you don't have an account, just leave the password field blank.
You mean when the enemies attack dink but also hit another one near dink?
Here is a little script to prevent that...
( put it into the creatures script )
void main(void)
{
int &calc;
int &calcb;
//THE REST
}
void hit(void)
{
&calc = sp_strength(&current_sprite, -1);
if (&enemy_sprite == 1) goto skip;
&calcb = sp_hitpoints(&current_sprite, -1);
&calcb += &calc;
sp_hitpoints(&current_sprite, &calcb);
SKIP;
}
When bonca A hits bonca B, then the damage of bonca A is added to bonca B's health. So he is healed....
I use this in "War Planet" when the enemy shoots with mortars and other bombs.
Here is a little script to prevent that...
( put it into the creatures script )
void main(void)
{
int &calc;
int &calcb;
//THE REST
}
void hit(void)
{
&calc = sp_strength(&current_sprite, -1);
if (&enemy_sprite == 1) goto skip;
&calcb = sp_hitpoints(&current_sprite, -1);
&calcb += &calc;
sp_hitpoints(&current_sprite, &calcb);
SKIP;
}
When bonca A hits bonca B, then the damage of bonca A is added to bonca B's health. So he is healed....
I use this in "War Planet" when the enemy shoots with mortars and other bombs.