The Dink Network

Reply to Re: bugs introduced by v1.08 and some stuff that probably should be in the help file

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, 01:35 PM
dinkdead.gif
"sp_active does not kill immediately; some of the standard dam- scripts have sp_active(&current_sprite,0) and code underneath, which runs. It seems to be equivalent to sp_kill(&current_sprite,1)."

I've been experimenting...
sp_active(&current_sprite, 0) kills the script at the next wait() only, but the sprite at the next wait(), say_stop() or the like.
sp_kill(&current_sprite, 1) kills both at the next wait(), say_stop(), etc.

To test, put this in a hit/talk proc and comment out one or the other:

sp_active(&current_sprite, 0);
//sp_kill(&current_sprite, 1);
say_stop("1", 1);
say_stop("2", 1);
say_stop("3", 1);
wait(1);
say_stop("4", 1);

With sp_kill Dink will say 1, with sp_active he'll say 1, 2 and 3.
If you change sprite 1 to &current_sprite, odd stuff happens. With sp_kill, 1 will flash briefly above where the sprite was, which is more or less expected. With sp_active, it says 1, 2 and 3 but in the top left corner of the screen while the sprite disappears - seems the sprite is gone but not the script.