ID:272340
 
how would i make it where when i walk out a certain area it switches 2 next map

Example: 6,10,1 but when i walk out a certain area teleports me to 1,1,2

i know it can be done but im puzzled any help would be appreciated
The simplest way to do it is to define a subtype of /area, and on Exited(), teleport the player.

area/teleport
Exited(atom/movable/A)
if(ismob(A))
A.loc = locate(1,1,2)
..()


There are other better ways to do it, like specifying a tag instead of a coordinate, or defining a subtype that'll handle many instances of this behaviour, but I'll leave that for you to figure out.
You could make teleporter tiles, and make it so their Enter() proc teleports the player.
In response to Seraphrevan
so i would make an invisible tile? then but that code in and when i step on it it will teleport meh to the area i want??
In response to Sesshomaru XX
come one i only need 2 more things to finish inuyasha game i have 5 maps already complete i just need 2 know when someone steps on a certasin tile it will tele them to that map lol plz tell me all the juicy details 0.0 not for me to figure out lol ive spent 3 months on this game its ready to be released! ^^
In response to Sesshomaru XX
You would use Entered() and not Enter().

/turf/grass
icon='grass.dmi'
tele
name="grass"
var/id="z2"
Entered(atom/movable/A)
var/dest=locate(id)
if(!A.Move(dest)) //Call move proc if possible, but if there is already a dense object there, bring A to dest anyways
A.loc=dest
return ..()

You set the turf's tag that you want the user to be teleported to a string like "teleport_here" and then set the teleporter's id var to the destination's tag.

You could use an area, though you'd need to create a separate one for each destination (I think).
In response to Nickr5
In response to Sesshomaru XX
w8 nvm when i run across it it teles me but into a black area.... the whole 2nd map is filled with dirt so i dont see how it would be black stuck again plz help
In response to Sesshomaru XX
You didn't set the tag or ID like I said.