ID:159754
 
Hi! im looking to display object names while you hover the cursor over the item, pretry much an on screen name display using text through dmi. but unfortunetly im not familiar with how to do this so only the player hovering over the object with the cursor can see it. id think of doing it by spelling the name out on the map... but im not sure how to set it up where it locates where the item is by client screen and all the junk.

Can i get some help? :). thanks.
First of all, you need something to make a text-on-screen type of thing, such as DMIFonts by Lummox JR

Now, you need that text object set up to be an /image

Then all you have to do is display it to the person when hovered and taken off when not being used:
mob
var/image/display_name

New()
..()
display_name = ImageTextName(src.name) // display_name contains an image() of the person's name is what I am trying to show here
display_name.loc = src // So the name appears on the person
display_name.pixel_y = 16 // You can figure this out... maybe
display_name.layer = src.layer+1 // Don't want the name to be hidden by the character neh?

MouseEntered() // Not sure if this is the proc name and too lazy to look it up
usr << src.display_name // The /image is displayed to the usr - now they can see the person's name!

MouseExited() // See MouseEntered() comment
if(src.display_name in usr.client.images)
usr.client.images -= src.display_name


This involves /image for only one person to see the name of a person when hovered on - and not seen to everyone else. You can use the forum search (or go through my blogs) to see topics made by myself and/or others about a few tricks you can do with image()