ID:1610357
 
(See the best response by Ter13.)
Code:???
This is as far as I went... things started to get confusing with the ref.
uchiha
verb
sharingan()
usr<<"[src] just unlocked his sharingan"
screen_loc="1,1"

icon='\icons\doujutsu\sharingan.dmi'

// icon_state="sharingan"


Problem description:
I want to make my verb spawn my sharingan icon above a mob.


Where did I go wrong with this?
Well first you need to create some sort of atom or datum to place on top whether it's an image or an object. For instance, this is how you would do it with an object.
var/obj/a = new() // create an instance of an obj
a.icon = 'sharingan.dmi' // give it that obj an icon
usr.overlays += a //add ontop of the mob through a built in list called overlays.
Or if you were trying to work with HUDs, you assign icon, iconstate, and screen_loc to an object:

obj
sharingan
screen_loc="x,y"
icon='iconfile.dmi'
icon_state="iconstate"


The verb should output and add the object to the user's client screen:

mob
uchiha
verb
sharingan()
usr<<"[src] just unlocked his sharingan"
usr.client.screen+=new /obj/sharingan

Best response
Anybody talking about screen objects needs to exit the thread. OP doesn't want a screen object, based on his request.

What he wants to do, is create an object in the world above the player. If he wants to move the object with the player, he needs to hook movement and move that object with the player.

It's not a simple solution.

Adding a battle graphic to a player's overlays leaves them immutable for animation, using an /image object leaves them unable to be seen by anybody not specified, and using screen objects has the disadvantage of not being seen by any player not specified, plus requiring updates for each individual player based on the player's offset. Plus, it'll really screw up your viewport size if you aren't careful.

Very clearly, the best solution is to hook movement and use a normal object. with pixel offsets.
In response to Dr.DraX
Dr.DraX wrote:
Or if you were trying to work with HUDs, you assign icon, iconstate, and screen_loc to an object:

obj
> sharingan
> screen_loc="x,y"
> icon='iconfile.dmi'
> icon_state="iconstate"
>

The verb should output and add the object to the user's client screen:

mob
> uchiha
> verb
> sharingan()
> usr<<"[src] just unlocked his sharingan"
> usr.client.screen+=new /obj/sharingan



How would I design a verb that toggles on and off? would just place "|null " behind new?
In response to Alex Ovide
You would spawn() it and delete the object.
? Not really sure how to do that.
In response to Dr.DraX
Dr.DraX wrote:
You would spawn() it and delete the object.

spawn() doesn't do what you are implying it does.
I'm going to post this as answered in case someone has a similar problem and can understand this solution.