Reply to Re: Problems with multiple hits
If you don't have an account, just leave the password field blank.
Sprite's hit procedure is run even if it's nohit is set to 1. Try this:
void hit (void)
{
if (&chickpanic == 1)
return;
&chickpanic = 1;
playsound(61, 44100, 0, ¤t_sprite, 0);
sp_nodraw(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
freeze(¤t_sprite);
&x = sp_x(¤t_sprite, -1);
&y = sp_y(¤t_sprite, -1);
&y -= 5;
&temp = create_sprite(&x, &y, 7, 945, 1);
sp_seq(&temp, 945);
wait(600);
&chickpanic = 0;
sp_active(¤t_sprite, 0);
kill_this_task();
}
So the hit proc is simply skipped if &chickpanic is set to 1. Was this what you wanted?
void hit (void)
{
if (&chickpanic == 1)
return;
&chickpanic = 1;
playsound(61, 44100, 0, ¤t_sprite, 0);
sp_nodraw(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
freeze(¤t_sprite);
&x = sp_x(¤t_sprite, -1);
&y = sp_y(¤t_sprite, -1);
&y -= 5;
&temp = create_sprite(&x, &y, 7, 945, 1);
sp_seq(&temp, 945);
wait(600);
&chickpanic = 0;
sp_active(¤t_sprite, 0);
kill_this_task();
}
So the hit proc is simply skipped if &chickpanic is set to 1. Was this what you wanted?






