Author
|
Topic: sp_kill or sp_active?
|
Beuc |
posted 03-16- 04:09 AM CT (US)
To delete sprites, I see sp_kill(&sprite, 10); but also sp_active(&sprite, 0);What is the difference with them? Btw, I noticed that when you use sp_kill, even with a draw_hard_map just after, it doesn't delete the hardness (but sp_active do).
Thanks.
|
Phoenix
|
posted 03-18- 02:01 PM CT (US)
I do know a little difference between them...sp_kill(&sprite, 10); The # you enter there (10) tells sp_kill to wait 10 miliseconds before killing the sprite. I think this is to avoid a wait(10); and then do a sp_active(&sprite, 0); (This won't stop the script while waiting for the sprite's death) sp_active(&sprite, 0); This kills the sprite right away. DEAD! ;)
|
Beuc
|
posted 03-20- 04:54 AM CT (US)
Mmm, this nick reminds me someone :)So I reformulate: What is the difference between sp_kill_wait(&sprite) and sp_active(&sprite, 0). They seem to have the same function, but sp_active seeems to work better with sprite with warp. |