ID:2252185
 
Currently animating (threw animate() ) objects in underlays or overlays doesn't work. Like, no animation will show up at all.

Not sure if this is a bug or is something intended but I'd love to be able to animate() objects in my overlays/underlays lists.

:)
You have to animate() it BEFORE adding it to overlays. Once it's already added to the overlays its appearance is basically set, so if you wanted to say, animate() an existing overlay (or really do any visual changes to it that don't line up with the thing it's been overlayed on), you'd need to remove the thing from overlays, change it, and add it back.

You should also note that doing something like

var/image/my_overlay = image('myicon.dmi',"state")
overlays += my_overlay
my_overlay.color = rgb(120,0,0)


Will actually make 'my_overlay' and the item you just added to the overlays list different from each other, so if you tried to

overlays -= my_overlay


It wouldn't remove it, since you're trying to remove an appearance that doesn't match the one in overlays anymore.

var/image/my_overlay = image('myicon.dmi',"state")
my_overlay.color = rgb(120,0,0)
overlays += my_overlay

// If you want to change it...

overlays -= my_overlay
my_overlay.color = rgb(0,120,0)
overlays += my_overlay