ID:167667
 
i want to make a roof code where when you go inside the roof vanishes, i have that part done but i would like to know how to make it go black outside once your in the building.
In response to Artemio
guess you werent listening, i have the roof part working where it vanishes when you go inside,but i want to add an extra bit where once your inside you cant see outside.
In response to Turishi
Euh, you set the wall's opacity to 1, that way you can't see through the wall.
In response to Mysame
yah but thats ugly also then you wouldnt be able to see the roof from the outside, just a black square.
In response to Turishi
Alright, this perplexed me for a moment, so I am going to make you a lib to take care of this.

Even if someone else does it first, I think this would be a nice lib to add to m collection anyway, so I'll let you know when it's all done. You'll probably have it figured out by then, but it'll still be worth a look [and download ;)].
In response to Turishi
Look at the atom/Entered and atom/Exited procs. Think really hard about Mysame's advice.
In response to Audeuro
well i tryed to make it so the walls opacity changed when you went inside the building but they also became opaque for other ppl outside
In response to Turishi
Thanks to Cheetoz for the following code:

        for(var/turf/wall/W in view(src))
var/image/I = image(W.icon, W, W.icon_state)
I.opacity = 1
client.images += I


And an explanation:

Well, I asked, and he said you could either use the /image datum or you could do it this way. You're looping through every type of wall in view() ( Which, noted by Cheetoz: "You'll need to expand this if your room is bigger than view() ) and copy the image, then edit the opacity var and add it to client.images. You can clear images on Exited().
In response to Audeuro
it wont work for some reson can u post the whole area code?
In response to Turishi
I don't even think it works, I was just pulling out my ass.
In response to Cheetoz
area
wally
Entered()
for(var/turf/wall/O in view(src))
var/image/I = image(O.icon, O, O.icon_state)
I.opacity = 1
usr.client.images += I

Thats what i got but nothing happens when you enter.
In response to Turishi
That's odd - I tested it out with density and it worked fine. Are you sure that you have walls within 5 tiles?
In response to Audeuro
yes