ID:155587
 
I was curious if someone could post an example of a basic verb code to relocate a player from one map to another?
Been diving into the DM for about 3 weeks or so and despite reading the entire 'bluebook' end to end and referring/scanning it over and over I have yet to figure this out.
I would prefer assign this verb to a 'turf' icon as apposed to a 'obj' until I figure how to make objects un'get'able.

If any kind soul could lend a hand here I could move on to testing other things...
Hmm...I don't want to sound rude but three weeks and you can't make something that easy(Use the DM guide!)? I guess everyone learns at there own pace though.

turf
Door
density = 1
Enter()
usr.loc = locate(X,Y,Map)


That's basically all you need. You have to put the correct cordinates of the location they will relocating to, like this:

turf
Door
density = 1
Enter()
usr.loc = locate(5,5,1) <----


Hope that helps.
In response to Shadow813
I see...

I thought it was
locate(x-axis,y-axis,z-axis)

I take it the 'map' number is based top down how the map files appear in the DM then?

i.e. if one created 'aviary.dmm' and 'zoo.dmm' (given that they are arranged alphabetically) then 'locate(3,2,2) would be zoo right?

In response to Slobad
Err...no. The map number is the frame your on, you can have one map file with multiple map frames. It would make the most sense to use multiple frames, then create different styles on each or however you like.
In response to Shadow813
odd...it seems to work actually.

two completely different '.dmm' files did locate(5,5,2) to indicate the second map file and it worked...same for the return portal locate(5,5,1).
In response to Slobad
If each dmm has only one frame it should work the way you want.
In response to Slobad
It shouldn't have worked. Have you checked if there were two different icons on each map? Like a pink tile on zoo.dmm at 1,1 and a green tile on the other map? Just to test it out. But what he said works fine. The x and y are the location of the map and the z is the instance.
In response to Shadow813
By frame you mean another z-axis?
In response to Slobad
Slobad wrote:
By frame you mean another z-axis?

Yes, that's what he means. If each map has exactly "one" z-instance then I supppose it should work. I have never tried this.. You can always edit your map file by clicking edit at the top and changing the Map Size.
In response to Xirre
oh yes they are very different maps.

Just tried it with a third .dmm and the locate(5,5,3) takes me right to it =)...I was sure to name the third .dmm file so it would be third 'topdownwise' as appears on the DM.

lemme copypasta this to show...

turf
portal
icon = 'portal.dmi'
density = 0
Entered(mob/m)
if(ismob(m))
m.loc = locate(5,4,2)
secondportal
icon = '2-1portal.dmi'
density = 0
Entered(mob/m)
if(ismob(m))
m.loc = locate(16,17,1)
thridportal
icon = 'portal.dmi'
density = 0
Entered(mob/m)
if(ismob(m))
m.loc = locate(5,4,3)
my map files are as appears...

neon1.dmm
neon2.dmm
xneon.dmm

'portal' takes me to neon2.dmm
'secondportal' takes me back to neon1.dmm
'thridportal'(heh just saw that) takes me to xneon.dmm

all as I intended...

...something I missed maybe?