Because we can "keep track" of the overlay using its container object, we can assign it to a variable belonging to the mob and add or remove it at will. You can probably accomplish the same thing with /icon variables if the game is more dynamic with its icons, but the concept remains the same.
#5 May 31 2010, 6:56 pm (Edited on May 31 2010, 7:15 pm)
Because we can "keep track" of the overlay using its container object, we can assign it to a variable belonging to the mob and add or remove it at will. You can probably accomplish the same thing with /icon variables if the game is more dynamic with its icons, but the concept remains the same.
Ummm, how does that hide an overlay from certain players alone? o.o
Take this case into consideration.
there are few mobs having see_invisible =2
all others have see_invisibile=1
Now I want to show a certain set of overlays to mobs who can see more.
How is that done?o.O
Because adding an obj to overlays does not result in an overlays list containing an obj. All visual (and some stupid nonvisual) data of the object is compressed into an appearance object instead. When you get X:type, you get the /image type out of it (though I don't think it's actually that type). image objects do not support invisibility, though in this case the issue is that you are extracting precisely zero visual data from the object in the overlays list and so you are adding an object with no icon to overlays. If you fixed this, you would be able to see it regardless (as, again, invisibility is not supported here).
Of course, I have no idea what this has to do with my post.
Ummm, how does that hide an overlay from certain players alone? o.o
Take this case into consideration.
there are few mobs having see_invisible =2
all others have see_invisibile=1
Now I want to show a certain set of overlays to mobs who can see more.
How is that done?o.O
Image Objects.I am a noob here and umm I ready this.. the image objects part in reference. And I guess the implementation is somewhat like this
var/image/I = image('icon.dmi',usr) //make an image attached to usr for(var/client/M) if(M.mob.see_invisibile>=2) M.mob << I //allow mob to see it else//how do you disallow the mob to see it ?
Of which I don't have an idea to implement.Am I right?Where am I wrong?
for(var/X in usr.overlays)usr.overlays -= X
var/n = new X.type
n.invisibility = 1
del(X)