ID:167667
Feb 14 2006, 4:51 am
|
|
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.
|
Feb 14 2006, 5:01 am
|
|
http://developer.byond.com/hub/PirateHead/rooflib
|
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)) 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 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
|