ID:2160918
 
(See the best response by Ter13.)
Is it possible to make an image visible to all players without calling on it more then once?

This is the only thing I can think of and I'm pretty darn sure it will only output to the players currently online. I was having difficulties with removing some overlays but I know images are just amazing these days and so I am trying to make some particular overlays handled through the image system.

Thanks in advance guys =)
var/whatever = image(icon='whatever.dmi',src)
players << whatever
Best response
Sort of.

Basically, you can operate on a list using <<. However, this is engine shorthand for looping through every object on the list and showing it to them all at once. It'll be slightly faster than doing it yourself.

var
list/global_images = list()
list/clients = list()
list/players = list()

mob
Login()
players += src
..()
Logout()
players -= src
..()

client
New()
. = ..()
if(.)
clients += src
images += global_images
Del()
clients -= src
images.len = 0
..()

global_image
parent_type = /image
proc
Destroy()
global_images -= src
for(var/client/c in clients)
c.images -= src
New()
global_images += src
clients << src
..()

Del()
Destroy()
..()
This is freaking perfect; Thanks buddy.
In response to Ter13
this is genius!