ID:167600
 
i cant create an over layer because when i do it appears as an underlay can anyone give me an example code
usr.overlay += icon('icon.dmi',"icon_state")
/dm>
an example
Press F1 In DM


Quoted From The Dm Reference

"

var/const
ARMOR_LAYER = FLOAT_LAYER-1
CLOTHES_LAYER = FLOAT_LAYER-2
obj/overlay
armor
icon = 'armor.dmi'
layer = ARMOR_LAYER
clothes
icon = 'clothes.dmi'
layer = CLOTHES_LAYER
mob/verb
wear_clothes()
overlays += /obj/overlay/clothes
wear_armor()
overlays += /obj/overlay/armor
remove_clothes()
overlays -= /obj/overlay/clothes
remove_armor()
overlays -= /obj/overlay/armor
Mxjerrett wrote:
i cant create an over layer because when i do it appears as an underlay can anyone give me an example code

obj/shirt
icon = "shirt.dmi"
layer = MOB_LAYER + 2

mob/verb/Put_On_Shirt()
usr.overlays += /obj/shirt
usr<<"You put on a shirt!"

mob/verb/Take_Off_Shirt()
usr.overlays += /obj/shirt
usr<<"You take off a shirt!"


I think you forgot to add the layer.

M 1 2 3 4 5

M being the mob and the numbers you added to the layer.