The Dink Network

Reply to Re: How to completley kill a sprite and script?

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:
 
 
September 25th 2011, 05:49 AM
dragon.gif
Quiztis
Peasant He/Him Sweden bloop
Life? What's that? Can I download it?! 
You can use sp_script to replace a sprite's script with another script:
int &s = sp(1);
script_attach(0);
sp_script(&s, "newscript");
kill_this_task();

Newcript could include:
sp_active(&current_sprite, 0);
kill_this_task();


Or you could have sp_active in the die procedure or in the script somewhere as sp_active will destroy anything and it's not possible to resurrect anything crushed by sp_active(~~, 0);