ID:163338
 
I want to give my characters a verb that allows them to become invisible, but i want there to be a suitable effect before their icon becomes invisible. What is the best way to do this?
To make them invisible:
flick("sparkle",src) // makes the "sparkle" icon state appear before they go invisibile
src.invisibility = 1

src.invisibility = 0//to make them visible again
In response to Mecha Destroyer JD
The call to flick() would be useless, since you're immediately setting src's invisibility right after. The animation would never be seen.
In response to Unknown Person
Yeah, is there a way to make it so it delays as long as the icon state?
In response to Kaiochao2536
Kaiochao2536 wrote:
Yeah, is there a way to make it so it delays as long as the icon state?

Use sleep() or create a temporary object and use that to show the animation.

-- Data