The Dink Network

Reply to Problems with multiple hits

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
July 21st 2008, 11:07 AM
dinkdead.gif
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, &current_sprite, 0);
&chickpanic = 1;
sp_nodraw(&current_sprite, 1);
sp_nohit(&current_sprite, 1);
freeze(&current_sprite);
&x = sp_x(&current_sprite, -1);
&y = sp_y(&current_sprite, -1);
&y -= 5;
&temp = create_sprite(&x, &y, 7, 945, 1);
sp_seq(&temp, 945);

wait(600);
&chickpanic = 0;
sp_active(&current_sprite, 0);
kill_this_task();
}