ID:263997
 
Code:
mob
NPC
name="???"
verb
Talk()
set src in oview(1)
//text here, dont needa see it
usr.Move(locate(/turf/newworld2))


Problem description: it never moves me to the turf.

Then it would be from the result of one of the following two:

1) You obtained a runtime error (check options & Messages). This would occur if you the locate()d /turf's path is not found, as if it was not placed on the map.

2) Someone/something dense is already on that locate()d turf. There are a few places where you want to use X.loc = Y instead of X.Move(Y) and this is one of them. The reason being that Move() checks if there's any dense/un-enterable atoms at Y; if there isn't, X will move() there. X.loc = Y will force X to move to Y, this will not check if there's any dense objects there already and will not call the new /turf's Enter()/Entered() and the old turf Exit()/Exited()
In response to GhostAnime
GhostAnime wrote:
Then it would be from the result of one of the following two:

1) You obtained a runtime error (check options & Messages). This would occur if you the locate()d /turf's path is not found, as if it was not placed on the map.

2) Someone/something dense is already on that locate()d turf. There are a few places where you want to use X.loc = Y instead of X.Move(Y) and this is one of them. The reason being that Move() checks if there's any dense/un-enterable atoms at Y; if there isn't, X will move() there. X.loc = Y will force X to move to Y, this will not check if there's any dense objects there already and will not call the new /turf's Enter()/Entered() and the old turf Exit()/Exited()
nothing dense is on the turf i wanna goto.

i checked with options & messages and no runtime error...
my friend said to use usr.loc(x,y,z) or something like that but theres a slight problem - everything is on a different map to keep it organized.

i tried usr.loc = locate(/turf/newworld2))
but that doesnt even work. me and my friend think it's a BYOND error...
my friend ALSO has this problem...
In response to GhostAnime
Well we, eternal desire and i tried it with areas and it worked.

usr.Move(locate(/area/movement1))

but i still have a question why didnt it worked with turfs?
i tried both move() and locate() with it.
In response to Hardik
You've been answered already. Most likely either there was no turf of that type on the map, or the one found is dense or has something dense on it. You shouldn't be using /areas for just locating, anyway.

Change back to using turfs/coordinates (no reason why you shouldn't be able to use coordinates if you've got multiple map files BTW. they just get added to different z levels) and try using this for your teleporting, which will cause it to ignore density and work regardless:
atom/movable/proc/Teleport(atom/newloc,dir) //defining a new proc for movables
//this proc will be a "wrapper" for calling the Move() proc.
var/old_density = src.density //remember the current atom's density value
src.density = 0 //make it non-dense so it's movement won't be blocked by density
. = src.Move(newloc,dir) //call the Move() proc to do the actual movement.
//note the setting of the . variable. this is so the proc that called Teleport() can know if the movement succeeded or not. more on this later
src.density = old_density //restore the density to what it was before
In response to Kaioken
Using tags is many, many times better than using either coordinates or new type paths. [link]
In response to Garthor
Didn't claim otherwise, though I daresay coordinates have their uses. I was just clarifying for him since he seemed to think that if he has 2 different map files he can't move between them or use coordinates from the 2nd file, or whatever he might've thought.