mob/proc/MonsterIcon()
var/icon/I
I = src.icon
var/list/states = icon_states(I)
if("0,0" in states)
for(var/x=0, x<4, x++)
for(var/y=0, y<10, y++)
if("[x],[y]" in states)
var/obj/O = new()
O.icon = I
O.icon_state = "[x],[y]"
O.pixel_x = x*32
O.pixel_y = y*32
O.layer = src.layer
src.overlays += O
src.icon_state = "0,0"
With this code I am limited by the pixel offset and anything that goes past 128 pixels either shows in the wrong location or doesn't show at all. Is there a way to use a small process like this? I have over 300 mobs that use this same process and I would like not have to do anything to them. Just to be able to use a small process like this to put mobs together.