How to completley kill a sprite and script?
How to completley kill a sprite and script?
If I have placed a sprite with the editor,
int &s = sp(1);
the sprite has a script attached
w1-stg
Is it just to call its die() procedure, or must I do something more?
If I have placed a sprite with the editor,
int &s = sp(1);
the sprite has a script attached
w1-stg
Is it just to call its die() procedure, or must I do something more?
sp_kill(¤t_sprite, 1); kill_this_task;
Use global variables if you want to make the script DIE DIE DIEEE completely.
Good luck with your dmod,dude!
Oh, and put ¤t_sprite there, it changes to the symbol.
You can use sp_script to replace a sprite's script with another script:
Newcript could include:
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);
int &s = sp(1); script_attach(0); sp_script(&s, "newscript"); kill_this_task();
Newcript could include:
sp_active(¤t_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);
isnt it something like
sp_active(¤t_sprite,0);
and
kill_this_task();
dang quiz...
sp_active(¤t_sprite,0);
and
kill_this_task();
dang quiz...
I've found that sp_kill works just as well. Oh, and yes, you put those brackets in kill_this_task.
so
Also, if you call on the die(); procedure you can kill the script. And add sp_kill to make the sprite disappear.
so
sp_kill(¤t_sprite, 1); if you like me sp_active(¤t_sprite, 0); if you don't kill_this_task();
Also, if you call on the die(); procedure you can kill the script. And add sp_kill to make the sprite disappear.
soz MsDink.
sp_kill will also work, but you have a wait time of 1 before it's killed, so I's not quite that good if you compare to sp_active. 1 MILLISECOND, HUGE DIFFERENCE!
sp_kill will also work, but you have a wait time of 1 before it's killed, so I's not quite that good if you compare to sp_active. 1 MILLISECOND, HUGE DIFFERENCE!
You're RIGHT!
But a time of 1 is almost like.... a millisecond. It works in my DMOD.
Edit: Lol Quiztis.
But a time of 1 is almost like.... a millisecond. It works in my DMOD.
Edit: Lol Quiztis.
pff your answer was better and more informed anyways quiz