Reply to Problems with multiple hits
If you don't have an account, just leave the password field blank.
The animation (and noise etc) plays every time if I keep hitting this sprite, how can I make it play just once? It does disappear from sight though.
If I hit it then wait for a bit it disappears properly and is unhittable, presumably after the wait(600).
It makes no difference if I put the nohit first with a wait(1) afterwards. How can I fix this?
void hit (void)
{
playsound(61, 44100, 0, ¤t_sprite, 0);
&chickpanic = 1;
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();
}
If I hit it then wait for a bit it disappears properly and is unhittable, presumably after the wait(600).
It makes no difference if I put the nohit first with a wait(1) afterwards. How can I fix this?
void hit (void)
{
playsound(61, 44100, 0, ¤t_sprite, 0);
&chickpanic = 1;
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();
}







