ID:267919
 
var/obj/overlays/S = new(usr)
S.icon = 'turf.dmi'
S.icon_state = "gasmask"
usr.overlays += S


The code above works in a way.

It adds the gasmask etc...

...but it adds the gasmasks as a UNDERLAY, while the code says it must do it as a OVERLAY.

How do I fix this???
Phoenix Man wrote:
> var/obj/overlays/S = new(usr)
> S.icon = 'turf.dmi'
> S.icon_state = "gasmask"
> usr.overlays += S
>

The code above works in a way.

It adds the gasmask etc...

...but it adds the gasmasks as a UNDERLAY, while the code says it must do it as a OVERLAY.

How do I fix this???

You must set the object's layer above the mob's layer;
S.layer = MOB_LAYER+1


~>Volte
layer = ??
maybe?