ID:1657206
 
(See the best response by Aeon Games Inc.)
Code:
        var/obj/powers/lockon/l=new()
l.loc=src.loc
sleep(10)
usr.sight |= ~(l)


Problem description:
So what im trying to do is make something invisble or visible to certain players. I thought i could do something like this as the reference you can turn off mob/obj/turf sights. The method i have didnt work but is there a way to turn off sight for certain obj type.

Obviously i was experimenting with a lock on system. You click and a cursor would show below. I only want the player to show this cursor. Yes i could put it on screen view, but i from what i recall it wont be very nice in moving along with an enemy. Its better for hud things

nevermind i believe i have figured it out, i had to set the object to begin with invisibility of 1 or greater
well know a new problem comes, i set it to invisbility=1 or greater but when i do

usr.sight |= ~(l)

it makes every object of l become visible not the l i specifically identified
I have never seen the sight variable used in such a way, leading me to believe you are using it incorrectly. Check this out for more information on sight.

Moreover, I believe what you want to use are image objects.
I think I've done just about everything you can with this type of thing at one time or another. I don't understand exactly what you are trying to do, please tell us a bit more about what you are aiming for, and I'll do my best to help you get it working.
Best response
As said above by FKI image's are probably what you're looking to do.
 var/image/I = image('lockon.dmi',src)
usr<<I


At least if I remember right, that's one way of doing it. Haven't had to do something like this in awhile but hope it helps.
aeon games Inc, thank you. I had already found what i needed on another forum. But that is exactly what i needed. I use images instead of messing with sight. Anyway thank you anyway.

I think invisibility is handled really poorly after fidling with it and discovering how sight and invisiblity work.