i have a weird problem:

i have a weird problem:
var/list/DM = list("Key1","Key2")
icon = 'aa.dmi'
pixel_y = 32

for(var/mob/M in DM)
src.overlays += new /obj/dojostar

The problem is that the object doesnt appear above the users head. But when i do this with -32 for GM's, then the GM icon appears.
GM code:

icon = 'GMstar.dmi'
pixel_y = -32

if(src.GMlevel <=1)
src.overlays += /obj/GMstar

That snippet of coding is absolutely fine (although I do suggest only calling it once, instead of every login... Because it will add another overlay each time you login, and never take one away)

But as I said, that coding will create the icon above the head.

The problem lies in other coding not shown here, or in the icon.

The code you ripped from was really really buggy in all kinds of obscure places. So I can't help you there...
In response to CuriousNeptune (#1)
i'm sorry but i didn't rip this code. I've coded this myself. Like i said this works for the GM with the -32 but not for the icon above the head. And how could i make it so that i only have to call this only once instead of every login?
In response to CuriousNeptune (#1)
CuriousNeptune wrote:
The code you ripped from was really really buggy in all kinds of obscure places. So I can't help you there...

Where? What ripped code?

You can't really tell of the small snippet.

if i coded
mob/Login()world<<"Welcome [src.key] to naruto"

In response to Ultimate Productions (#2)
No, as afar as I know, the snippet isnt ripped.
But the rest of the source is :|
Ive had a glance at the game

The maps are the same as the wots/nbotls rips, and it is all setup the same and yeah... Not 100% conclusive, but im sure it could be if i double checked... :P
EDIT: Double Checked. Yes its a rip

Anyway, here's how to resolve the problem.


src.overlays += 'GMstar.dmi'

set category="Staff"
set name ="Give GM Star"
set desc="Used to add the GM Star overlay (only visual)"

for(var/mob/M in world)
var/give=input("Who do you wish to give a GM star to?","Give GM Star") as null|anything in GMList

Note: I took the liberty of adding a verb with which to restore the GM star to a GM that might have lost his overlays...
If the bit from var/GMlist confuses you, make the verb call mob/M in world... But with current set up (and modifcation on your part, if the variables dont match), the verb will bring up a list of all GMs and not all mobs... :)