ID:176820
 
Hey, I was wondering how you flick an overlay. I searched through the forum and found out a guy asked but no one answered. Does anyone think they can help? Thanks in advance.
I tried doing this:

Flick("Attack", /obj/overlay/armor/)

This did not give me an error and i thought I had it but it still doesn't work. Abyone have any suggestions?
In response to SSTrunks7
The second argument of flick() is the target. You did not provide a proper target in that line. It should probably be some kind of atom, not a type path. However, that's not the main problem.

The problem is that you can't just flick an overlay. Whatever icon or object you use in the first argument of flick() will replace the old icon of the target for a brief moment instead of becoming an overlay.

One way to work around this is to add the picture to the target's overlays, use spawn() to wait a moment later (possibly while flicking an icon state), and then remove the picture from the target's overlays.