ID:162222
 
how do I set a map when teleporting a person?
Set a map?

Do you just mean how do you place them in a certain place?

If you want a specific coordinate use:
src.loc=locate(x,y,z) (change x,y & z accordingly)

To teleport them to a mob as part of a verb or something, use code like this:

mob/verb/Teleport(mob/M in oview(usr))
set name="Teleport"
set desc="Teleport to a mob in your view"
usr.loc=M.loc


On the other hand, if youre talking about to a different map(.dmm) file all together... then I think youre out of luck. I don't think it's possible.
i.e. I think it combines all included map files into one map file when you run the game...
I could be wrong?

In response to Saucepan Man
there is a lib on this somewhere, because u can resolve map names and z levels accordingly, so u can set x loc, y loc, and map name.
In response to Superbike32
Superbike32 wrote:
there is a lib on this somewhere, because u can resolve map names and z levels accordingly, so u can set x loc, y loc, and map name.

You're probably thinking of pif_MapLoader.
http://www.byond.com/developer/Popisfizzy/pif_MapLoader
The same way you should be teleporting players within a map:

turf
teleporter
var/target = ""
Entered(var/mob/M)
if(ismob(M))
var/turf/T = locate(target)
if(T && isturf(T))
M.loc = T


Then, you place a teleporter, and edit it in the mapmaker (right click -> Edit...) so that its target variable is something unique. Then, you go to any other turf, and edit it in the same way so that its tag variable matches the target variable of the teleporter.
In response to Evre
nope, it dont load the map after, it just can resolve the names of the maps and allow you to use map names and stuff.

it cant just load the maps on the fly.
In response to Garthor
Thank you, I'll be using that for later, but how to I teleport them threw a verb, like, if someone talks to a person who gives you a quest or simply, a mage who's mastered teleportation, and they're supposed to teleport you to a different map (I created the first map with 50 x, 50 y, and 2 Z (for the city you start out in and the dark area you are in when your creating your character) and Idk about you but even if I added 50 Z's people would get tired or having to teleport, and that'd make it harder for me >.<)
In response to PheonixReborn
        var/turf/T = locate(target)
if(T && isturf(T))
M.loc = T