ID:1688968
 
Keywords: client, fogofwar, view
(See the best response by DarkCampainger.)
Code:


Problem description:
I want to control which atoms can be viewed by a client so to make a fog of war system, can I remove atoms from the list that contains visible atoms, the list that is returned with view(usr)??
This may be of some use to you.
Best response
The /list returned by view()/range()/ect is temporary and generated on the fly. Altering the list won't affect anything.

If you want to control which images a client can see, you need to use /image objects and client.images.
so isn't there any sort of list that will affects the visible atoms??

In response to Victorqr
Not for atoms directly. The best you can do is attach images to atoms and control which of those are visible by adding them to client.images.

I think you still can't run flick() on /images, but you can use a blank /image with override=1 to selectively hide atoms, and then just flick() the atom like normal.

I would look at the library Mightymo posted, it sounds like it does what you need.
Yeah I've checked the library before posting but it is not suitable for what I'm trying to do. But anyway I can use the image and hopefully store a reference of the image inside the atom it was assigned to, So later I can alter the image and make it invisible. Thanks for the help :)