ID:317822
 
(See the best response by Neimo.)
Is it possible to make icon visible only for the owner and that other players wuld not see that icon. Ty
Best response
I might not be correct on this, but you can take a look at Forum_account's Visibility Groups library.

You can also use:

var/image/I = new('image.dmi', usr)
usr << I
Another method could be to create a class of objects that are visible only to certain users.

invisiobj
// The invisobj class will still be tangible, but just
// not visible. That is, it can only be seen by certain
// mobs, but it will still interact with the overworld
// if it is dense.

parent_type = /obj

var
// The list of mobs this is displayed to. They are
// actually displayed to clients, but we'll just use
// this for simplicity.
list/displayed[0]

image/image

New(atom/loc)
..(loc)

image = new /image(src.icon, loc, src.icon_state)

icon = null
icon_state = null

Move(...)
..()

// Everytime the /invisiobj moves via the Move()
// method, the image's data is updated to support
// this change.

image.loc = src.loc
image.pixel_x = src.pixel_x
image.pixel_y = src.pixel_y
image.pixel_z = src.pixel_z
image.dir = src.dir

proc
// Now some events and event handler stuff.

Display(mob/m)
src.displayed += m
m << src.image

src.OnDisplay(mob/m)

UnDisplay(mob/m)
src.displayed -= m
if(m.client)
m.client.images -= src.image

src.OnUnDisplay(mob/m)

OnDisplay(mob/m)

OnUnDisplay(mob/m)


This is a clear example of where it would be nice for BYOND to have strict accessor and mutator methods for directly-changing variables. Alas, it doesn't, so this is the closest I can get that is also fairly general. Just make sure to use Move() to move the object.
Thank you so much.
LaNuiit wrote:
Is it possible to make icon visible only for the owner and that other players wuld not see that icon. Ty

You could use the Overlays library. You can attach an overlay to a mob and make only that mob able to see it:

mob
Overlay/my_overlay

Login()
..()

// attach an overlay to the mob
my_overlay = overlay("icon state")

// make it only shown to this mob
my_overlay.ShowTo(src)