ID:635986
 
(See the best response by Deathguard.)
Code:


Problem description:

when i move from my map to a room i made its completely dark except for my character
can some one tell me whats going on and how to fix it
Can you show the code you use for the transition, and describe the circumstances in which one might move?
atom/proc/Bumped(atom/movable/M)

atom/movable/Bump(atom/A)
A.Bumped(src)
..()

obj
Door
icon = 'objects.dmi'
icon_state = "Door1"
density = 1
Bumped(mob/m)
world<<"Door1!"
if(ismob(m))
m.loc = locate(5,5,1)

turf
Door2
icon = 'objects.dmi'
icon_state = "Door2"
density = 0
Entered(mob/m)
world<<"Door2!"
if(ismob(m))
m.loc = locate(5,5,1)


um when the player moves in the door1 its enters the other room that has door2 and every time i enter the new area or map its completely black
Best response
You realise that when you go into -either- door, it move the player that used the door to x5, y5, z1, right?
Is there anything -AT- 5,5,1?

You may be intending to do m.loc = locate(<an object in the world>) instead.
like a building? how do i go about doing that? um can you help? plaese
Well I'm not going to just write it for you; that way you won't ever learn to be better at the language.
What you need to do is go into Dream Maker, press F1 and look up locate() in the reference. You'll see that it takes some arguments;
locate(Type) in container

So, the container in your case is - probably - going to be the world; this is the default, so don't worry about it.
What you want to do is make it locate the 'inside' door of a room, and send the player there.
fair enough thx
yeah im lost
In response to Lunalovegood_fan
This is all pretty basic stuff. Have you read the guide?
yeah i printed it out
Is there something about the locate proc you don't understand? I mean, it's like a two-line change to the code you already have, so I'm kind of confused as to what you're not understanding.
Are you doing anything involving opacity or luminosity? Those are the only reasons I can think of that you'd be having a problem like this.

If there were no (5,5,1) then you would be sent to nullspace and have a black screen (not even your mob would show).
no i got density tho aperently i really suck a coding lol