ID:1465839
 
(See the best response by Kaiochao.)
Code:
mob
proc
overlayadd()
overlays+=image('pants.dmi')
overlayremove()
overlays-=image('pants.dmi')


mob
proc
overlayadd()
overlays+=image('pants.dmi',icon_state="red")
overlayremove()
overlays-=image('pants.dmi')


Problem description:
The 1st snippet removes the overlay, the 2nd 1 doesn't. What am I doing wrong with managing icon states for overlays?
Best response
The second image you're removing doesn't match the one you added. You need to match the icon state as well.
Thanks for the help.