ID:278634
 
(See the best response by LordAndrew.)
Hello, i'm just starting to learn about overlays and such want i want to find out how to add like a usr's name under their character in game. I've Tried Overlays.Add(src) in the loging but nothing show up when i hit run, any ideas?
To add something to the overlays you usually do:
usr.overlays += "something"
That something needs to be an icon or other image though. To add text you need to use a proper code to create the text image. There libraries out there but my memory is not so good as to remember their names or authors (LummoxJr maybe?). A search might help.
"There _are_ libraries..."
Why is there an edit button on the post if it does nothing? ?_?
In response to Kccmt
usr.overlays += ''*
Best response
Lige wrote:
There are a few libraries out there. You can search "name" and browse through games and resources alike until you find one. Here is one made by Polaris8920.

As for using Add() or += when messing with overlays, both work. I haven't noticed a difference, but usually I go with the former.

While it doesn't pertain specifically to this situation, the only real difference I've found between += and Add() is that Add doesn't play well with the . operator:

proc
listTest()
. = list()

. += "hello" + " world"

// error: ..Add: undefined type path
..Add("hello", " world")
Thank You, Kccmt for sharin that link and LordAndrew is right it doesnt really matter if u use Add or +=
Sorry, my bad. I didn't want to mean that += matters over .Add, my point was that you need to specify whose overlays you are adding something to.
In response to LordAndrew
I don't think that worked simply because the . operator wasn't defined as a /list type. Yes, you assigned a list to it, but it was never formally declared a /list type like below.
var/list/L = list()
L.Add("blah")