The Dink Network

What exactly happens when a sprite dies?

January 7th 2006, 08:33 PM
anon.gif
abjabj
Ghost They/Them
 
Hi,
I didn't find anything useful in the documentation, so here's the problem.
I placed some code in the die()procedure of an sprite and only the first few commands were executed -- after that: nothing.
The code is ok.
I copied it in the hit procedure and it worked perfectly.
So what is it with dying?
Is there a time limit or something like that?

Thanks in advance, ABJ
January 7th 2006, 10:03 PM
dragon.gif
Umm... what is the code you put in? We can't help you without knowing what code you used.
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();
}
January 8th 2006, 07:03 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Isn't there some way to artificially keep the sprite alive, so wait-type commands can be executed and still use &current_sprite?
January 8th 2006, 03:29 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
Check the mog script in the original game. I presume another sprite was created on that spot and had a script attached.
January 8th 2006, 05:29 PM
anon.gif
abjabj
Ghost They/Them
 
All Questions answered.

Thanks, ABJ
January 8th 2006, 07:13 PM
duck.gif
Tal
Noble He/Him United States
Super Sexy Tal Pal 
Can I get ABJ?

...

...
January 9th 2006, 09:03 PM
anon.gif
abjabj
Ghost They/Them
 
You want me
That's so nice from you, but i'm married

ABJ are my initials, and a whole bunch of people call me ABJ.
So there must be a really good or at least sad story to let me give up ABJ.

Let's see if i can do it...

CU, Andy.
January 12th 2006, 03:39 AM
dinkdead.gif
millimeter
Peasant He/Him Canada
Millimeter is Wee-Lamm, Recording Artist. :-) 
Depends if you are already married or not.
You say I do, then she say's "Oh no you don't."


But yes, I'm bitter.
mm