Author
|
Topic: Getting text to disappear after using sp_kill
|
Tamtur |
posted 05-24- 03:26 PM CT (US)
For my flashcard program, since I didn't want the text to "die" after a few seconds, I used sp_kill(&last_text, 0) - which works - however, I couldn't get it to die. I tried using sp_active and a second sp_kill but it didn't work. I ended up creating an invisible sprite, having the sprite say the word, using sp_kill on the text to keep it from disappearing before I wanted it to, and then killing the sprite to get rid of the words. This works fine, but does anyone know how to get the words to disappear after using sp_kill 0 on a say_xy? Or any ideas?
|
Phoenix
|
posted 05-24- 05:26 PM CT (US)
Do like this: int &text; &text = say_xy("`%Beta Testers", 0, 390); sp_kill(&text, 0);Then, when you need to kill it, write: sp_active(&text, 0); (Make &text a global int if you need to control it from different scripts) |
Tamtur
|
posted 05-24- 08:15 PM CT (US)
sp_active is what I tried - it works when I use sp_kill 0 on text that a sprite is saying and then kill that sprite with sp_active, but when I use say_xy it won't kill the text itself. I tried assigning &last_text to a global variable (so it wouldn't accidently be something else), but that didn't help. Ah, well, it works having an invisible sprite. Thanks anyway |
redink1
|
posted 05-26- 06:56 PM CT (US)
Have you tried this? I'm pretty sure you have, but just in case.sp_kill(&last_text,1); |
Tamtur
|
posted 05-27- 03:55 PM CT (US)
Yeah, I tried that. I think it's just a bug in the game.Thanks anyway |