ID:173241
 
How do i make doors that have the same icon go to different places? i dont want to make a seperate door for every room.
Githlar wrote:
How do i make doors that have the same icon go to different places? i dont want to make a seperate door for every room.

It really wouldnt be that hard making each door separately, but you could make the doors objs if they already arent. create an area for each door. and run some kind of check for what area the doors located in, then have it do whatever.
In response to Valderalg
Or, if you want to, you know, make things LESS complicated, you could do something like this:
turf
door
var/target
verb/Open() //Whatever
if(!target)
usr << "The door is jammed shut"
return 0
//blah blah blah, anything else you want to do before moving them
var/atom/A = locate(target)
ASSERT(istype(locate(target), /atom/))
usr.loc = locate(target)

Then, you just change the target variable to something for the doors on the map (right click, edit properties), such as "cavernExit", and then change the tag variable to the same thing for where you want to move to.

Notice that I used ASSERT. That makes the verb crash if the target is not an atom (turf, area, mob, or obj). Why would you want it to do that? Easy: because if a door can't find its target, or the target is of a type that you can't relocate someone to, well, then there's obviously a problem.
In response to Garthor
You could allways just make a door turf and have its density to 0 then just make invisible doors that lead to the places and place em over the door >.>
In response to RVegeta
But that doen't solve my problem.
im trying to avoid TOO MUCH typing :Þ