ID:172007
 
I've mad some different maps but I can't figure out how to walk from one to another. Can someone help.
turf/hole/hole
icon = 'hole.dmi'
Entered(mob)//If the user walks into the turf..
usr.loc = locate(x,y,4)//Make them come out right under where they stepped, but on a diffrent map.
usr << "You fall through the gigantic hole.."
sleep(8)
usr << "You finnaly hit the ground far below."

There you are, nice and neat, play with it as much as you want, enjoy ^_^!
In response to King_Dragoon
Thanks for the help :)
In response to King_Dragoon
Wrong on many counts in many places. That code snippet is bugged up beyond belief. First, don't use usr in Entered (Or in most any other procs for that matter); second, declare the mob variable's type; third, check to make sure it actually is a mob that is stepping on the hole (possibly even check to make sure it is a player's mob); fourth, use z-1 instead of 4; fifth, make the sleep and messages sync with what is happening (The player might get confused if he/she is allready walking around after falling and at some arbitrary time it says "You have finally landed."); and that is all I can think of at the moment.

I will give you credit for using Entered instead of Enter though, nearly all the time I see people using Enter which causes annoying bugs.

Here is the preferable way to do it.
mob
var/lock_movement=0
Move()
if(lock_movement)return 0
.=..()
turf/hole
Entered(mob/M)
if(ismob(M))
M<<"You stepped on a hole!"
M.lock_movement=1
sleep(20)
M<<"You have finally landed."
M.loc=locate(x,y,z-1)
M.lock_movement=0
In response to Loduwijk
Loduwijk wrote:
Wrong on many counts in many places. That code snippet is bugged up beyond belief. First, don't use usr in Entered (Or in most any other procs for that matter); second, declare the mob variable's type; third, check to make sure it actually is a mob that is stepping on the hole (possibly even check to make sure it is a player's mob); fourth, use z-1 instead of 4; fifth, make the sleep and messages sync with what is happening (The player might get confused if he/she is allready walking around after falling and at some arbitrary time it says "You have finally landed."); and that is all I can think of at the moment.

I will give you credit for using Entered instead of Enter though, nearly all the time I see people using Enter which causes annoying bugs.

Here is the preferable way to do it.
> mob
> var/lock_movement=0
> Move()
> if(lock_movement)return 0
> .=..()
> turf/hole
> Entered(mob/M)
> if(ismob(M))
> M<<"You stepped on a hole!"
> M.lock_movement=1
> sleep(20)
> M<<"You have finally landed."
> M.loc=locate(x,y,z-1)
> M.lock_movement=0
>



I find it odd that you have to declair M as a mob and still have to check if it "ismob". is the declairation of mob/M needed? or could you just use M?
In response to Jik
You can declare the type to be whatever you want, but there's still no guarantee it'll be a mob when you declare it as mob/M.
In response to Loduwijk
Yes later when he does use something like that he will lock the movment, but for now all's he needed was an example of how to get to the other mapping area, that is what I did for him ^_^.. But thanks for pointing that out..