ID:2546128
 
Problem description:
I'm looking for a way to have a sprite that becomes more transparent with the closer the player's mob gets to it (though you could also think of that as getting closer to the center of the screen, which abstracts it some from game logic like 'range').

Is there any combination of filter/animate things I can do that with? I'd rather not do anything intense like keeping a list of clients and how far their mobs are and adjusting an image in their client.screen, which I know would work, but is also computationally expensive for the server.

I would blatantly recalculate the desired transparency every time the mob moved.

Does this work for you?

obj/transparent_thing

mob/Move(NewLoc)
..(NewLoc)
var/max_range = 12
for (var/obj/transparent_thing/t in oview(max_range, src))
var/transparency = get_dist(src, t) * 255 / max_range
t.alpha = max(0, min(255, transparency))
You could place the object in question on its own plane and change the alpha of a PLANE_MASTER on that plane as you move.