p.current_light=image(new/obj/light, p)
var/matrix/m = new()
m.Scale(3)
animate(p.current_light, alpha=100, transform = m)
p.overlays+=p.current_light
Hey everyone. I'm trying to make spotlights on players that are solely visible to themselves. I didn't take into account that once current_light becomes a player's overlay, that it will no longer be treated as an image.
I believe Ter 13's object pools has some sort of KEEP_TOGETHER feature that may be able to accomplish this although I'm not too familiar with the library? I couldn't be certain. Essentially though, I'd like to accomplish something around the lines of this:
//image bullshit
//keep the image on the player somehow
p<<current_light
Adding an image to overlays is the same as adding the image's appearance to overlays, because overlays only contains appearances.