mob
var
isblind=0
obj
blindness
icon='blindness.dmi'
screen_loc="SOUTHWEST to NORTHEAST"
layer=MOB_LAYER-1
New()
for(var/turf/t in oview())
t.blind=1
turf
var
blind=0
Entered()
if(blind)
usr.isblind=1
var/obj/blindness/b=new
usr.client.screen+=b
Exited()
if(blind)
usr.isblind=0
for(var/obj/blindness/b in usr.client.screen)
usr.client.screen-=b
del b
Problem description:
The blindness object covers the mob. I'm trying to make it so the mob's icon isn't covered. I've tried looking through the layer variables in reference, and I've tried using layer=FLOAT_LAYER-1 along with various other attempts, but I can't seem to figure out how to have it so it doesn't cover the mob icon.
You're also abusing usr in /obj/blindness/New() when you call oview(). I'm not sure what you're trying to do with that, though.
2. You could take advantage of mob.sight in addition to a screen object. The screen object would have to be layered below the mob, which is fine, since actually blinding the mob will prevent anything else from being layered over it.