ID:138956
 
Code:
Download Here: http://files.byondhome.com/Ganing/MouseOver_src.zip

Problem description:
When you put your mouse over the NPC, his name shows, but also he shows again diagonally to him o.o. I don't know why, can someone tell me what's wrong? I'm also using Lummox's library to do this. I hope that helps... Tank j00 :D
Under mob/MouseEntered() change the line:

var/image/img = image(O,src)


To:

var/image/img = image(O,loc)
In response to Robertbanks2
Thanks Robert. I couldn't find it out to save my life!
In response to Ganing
I'd also like to note that the turf he is standing on is put diagonally to him... Now how do I get around that?!
In response to Ganing
mob
MouseEntered(location,control)
..()
if(control=="mapwindow.map")
if(usr.client)
var/t = src.name
var/color = "FFFFFF"
var/outline = "#000000"
if(!color) color="FFFFFF"
if(!outline) outline = "#000000"
var/obj/O = font.ImageName(src,t,color="[findtext(color,"#")?"[color]":"#[color]"]",outline="[outline]")
O.name="TITLE"
O.loc = loc

MouseExited(location,control)
..()
for(var/obj/O in location)//usr.client.images)
//usr.client.images-=i
if(O.name=="TITLE")
del O


This is what I came up with, it works. Don't know how perfectly efficient it is, but it does what it needs to and doesn't appear to be too terribly riddled with bugs.
In response to Robertbanks2
This works indeed, the only problem I find is that if you put the mouse over someone moving... the name is placed on the tile they were at as they keep moving. So it's random xD. But I guess it really can't be helped because it's placed on there location when the mouse was on them, not following them as if it were an overlay. I'd say there's a possible way to fix this as well, but I imagine it would be some code reworking.


EDIT: But doesn't this make it so that when you put the mouse over someone there name is available for everyone to see? Not just you?

EDIT 2: This has bugs xD the name doesn't get deleted generally
In response to Ganing
You could create the object on mob/New(), make a reference to it in a mob var, then add/remove it to/from client.screen on mouseover and update the screen_loc of the obj in Move().