The Dink Network

Reply to Re: What exactly happens when a sprite dies?

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:
 
 
January 7th 2006, 10:18 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Immediately after calling the die procedure, the sprite becomes inactive and the script is terminated.

The engine does not wait until the die procedure is done executing, only until it has a chance to.

So, if you can't have any wait-type commands in the die procedure (say_stop, move_stop, wait, etc) .

Or you could try something like this:

void die(void)
{
script_attach(0);
freeze(1);
say_stop("Aha! I can speak!", 1);
say_stop("Multiple lines!", 1);
unfreeze(1);
kill_this_task();
}