ID:2400540
 
Code:
        var/obj/animation/j = new()
j.layer = MOB_LAYER + 3
j.icon = ic
// j.icon_state = "[copytext(string, a, a+1)]"
j.pixel_y = py
j.pixel_x = dx2
m.overlays += j
flick("[copytext(string, a, a+1)]", j)
spawn(10)
m.overlays -= j
del(j)


Problem description:The problem is that if I use the icon_state, instead of flick, then I can run into graphics being displayed longer than they should, if lag is retarding the procedure. I know it would be nice not to have lag, but it happens sometimes when lots is going on with 5 players all in view of each other.

I would rather use flick, because it will only display each state of the icon one time, which would solve the problem. It doesn't work. When I use flick it just doesn't work. I don't know why.

Does flick just now work with overlays for whatever reason? I would have just placed the animation on the map in the loc of m, but the problem with that is I was hoping for the animation to follow m. I mean the cloud of dust when he gets hit, or the other effects that are on m would look stupid if they did not move with him. It seems overlays is the only way to accomplish that. The only other thing I could think of, but didn't do, was create a new var list of animation objects, and move them all to m's loc whenever m moves. That seems kinda drastic.

Is there something I am not understanding about flick, or why it doesnt work with overlays or images?

flick doesn't work with overlays, no. However you can use visual_locs to make the dust cloud follow the mob around.