ID:157527
 
obj/overlays=list(image(icon='Dork.dmi',pixel_y=32),image(icon='Dork2.dmi',pixel_x=-32))

Error: Expected constant expression.

I can't figure out how to assign a default overlay value to something.

The only way I've figured out is through New(). And it's really not desirable.

Thanks for any help.
You can make the predefined list of overlays, but they would have to be references to object in the sense that you are trying to do it (i think). You might try defining an object, such as obj/dork1 and give it the icon and pixel_y value, then set overlays=list(/obj/dork1,/obj/dork2,etc)
You need to use specific syntax in order for compile-time assignments like this to work. See: http://www.byond.com/ members/?command=reference&path=proc%2Fnewlist

In this case, what you want is:

obj
overlays = newlist( /image{ icon='Dork.dmi' pixel_y=32 },
/image{ icon='Dork2.dmi' pixel_x=-32 } )
like this
var/const
PLAYER_LAYER=FLOAT_LAYER-1
CLOTHES_LAYER=FLOAT_LAYER-2 //below PLAYER_LAYER
ARMOUR_LAYER=FLOAT_LAYER-3 //below CLOTHES_LAYER

mob
layer=PLAYER_LAYER
clothes
layer=CLOTHES_LAYER
armour
layer=ARMOUR_LAYER
mob/verb
Put_On_Clothes()
mob.overlays+=/mob/clothes //add clothes to player
Equip_Armour()
mob.overlays+=/mob/armour //add armour to player