ID:939508
 
Keywords: image
(See the best response by Boubi.)
Code:
 mob
LeftClick(mob/M)
if(src == usr)
src.target = null
var/image/I = locate("[M.key] Target Item")
if(I)
M.client.images -= I
del(I)
else
var/image/I = locate("[M.key] Target Item")
if(I)
M.client.images -= I
del(I)
var/image/T = image('Target.dmi',src)
T.tag = "[M.key] Target Item"
M.target = src
M.client.images += T


Problem description:
Not sure if this is a problem but I'm starting to try and learn images and right now I want to be able to pick individual images and delete them because they wil be used as targeting, statuses, etc.. and I want to see if this is an alright way to work with them or is there a more efficient way?

Best response
Referencing them to a variable would be more efficient in my opinion, as you could re-use it whenever needed.
That might be better. I tried to find the image in client.images with the image icon and wasn't finding anything.