ID:149883
 
Is there a way to make the roof disappear when you walk in the door?
use client images

or you could somehow use the client screen

useing these two methods will allow you to create and remove objects visible only to people who dont see the roof or those that do see the roof.

FIREking
In response to FIREking
Could you give me a small example?
In response to TK6000
You would literally have to create a new datum to accomplish this, as the normal behavior for objs and turfs wont really do you justice here.

Ive been trying to think of a way, and currently i havent found a perfect method yet.

But i think the new 101 levels of invisibility could do you justice for a little while. IF you dont have bulidings close to each other, such as one buliding takes up most of the screen, you could use the following method:

var/const/ROOF = 99
turf/magicroof
icon = 'something.dmi'
icon_state = "somestuff"
invisibility = ROOF//our universal code for roofs
layer = FLY_LAYER

you can now pretty much get the idea here. When a mob enters a door at the enterance of the building, you can disable the mob's ability to see the ROOF invis, therefore making it invisible to him, and allowing him to see the inside of the building. When mobs exit the buliding, you turn their ability to see the ROOF invis back on, making the roof reappear for them!

FIREking
In response to FIREking
So will I have to do the same the backwords for objs and mobs in the building?
In response to TK6000
This will only work in the beta versions. Don't bother to try it in BYOND 306.

area
roofed
var
Image // var to store an image of the roof

New() // when a roofed area is created (probably when the world boots)
..() // do the normal New() stuff
Image = image('roof.dmi',src,,FLY_LAYER) // Image is an image of the roof
// might want to use a higher layer

Entered(O) // when O has entered a roofed area
..() // do the default area entered stuff
if(ismob(O)) // if O is a mob
var/mob/M = O // create a mob alias to avoid the dread : operator
if(M.client) // if M has a client
M.client.images -= Image // remove the roof image from the client's view

Exited(O) // when O exited a roofed area
..() // do the default area exited stuff
if(ismob(O)) // if O is a mob
var/mob/M = O // create a mob alias for O
if(M.client) // if M has a client
M.client.images += Image // show the image to the client

client/New() // when a new client joins the world
..() // do the default stuff
for(var/area/roofed/R in world) // search for every roofed area in the world
images += R.Image // and add it's image to the images the client can see

I haven't tested this code yet, but it should work.