mob
proc
Targeting(var/mob/M as mob)
if(src.target)
var/mob/M2 = src.target
M2.overlays-=/image/target_pointer/
world << "[M2]=M2"
src.target=M
var/image/target_pointer/I = new
M.overlays+=I
src.client.images+=I
Problem description:
The first attempt at targeting doesn't work, the target var is set, but the overlays don't work. The second time targeting something (and any time after that), it works as it should, it removes the previous target's overlay, and places one on the new target. But that's not the only problem, if I remove the:
world << "[M2] M2"
The overlays don't work at all, it was there simply as a debugger. I thought it might be doing that because it could be sending the overlays(image) with M2 to the world, making it visible. But if it was, it should be showing the pointer on the previous target, not the active target. I'm sure I'm missing something obvious, or going about it the wrong way, but I can't figure it out.
Creating a subtype of /image may be causing some issues, as that's not actually intended use.