ID:266461
 
Ok, I have 3 maps. Heres what it says
Map 1
X = 20
Y = 20
Z = 1
Map 2
X = 20
Y = 20
Z = 2//Thats not true but its sposta be
Map 3
X = 20
Y = 20
Z = 3//Thats not true but its sposta be
Ok, heres the bug
When I had 2 maps, it worked, now it doesnt!
It says you start in (1,1,1) but I start in (1,1,3)!!
ASSISSTANCE!!!!
If you have three map files the first map you created's z level is 3 and it starts you on the z level of the first map created unless otherwise specified.
In response to Nadrew
Using GM powers it says Map 1 is Z 4
Map 2 Z 5 and Map 3 Z 1!
Bariscni Cough Drop wrote:
Ok, I have 3 maps. Heres what it says
Map 1
X = 20
Y = 20
Z = 1
Map 2
X = 20
Y = 20
Z = 2//Thats not true but its sposta be
Map 3
X = 20
Y = 20
Z = 3//Thats not true but its sposta be
Ok, heres the bug
When I had 2 maps, it worked, now it doesnt!
It says you start in (1,1,1) but I start in (1,1,3)!!
ASSISSTANCE!!!!

What you probably want to do is give each map an area or turf with a tag, and then use locate() to find that tag:
var/atom/map1=locate("map1")
var/atom/map2=locate("map2")
var/atom/map3=locate("map3")

...
thing.Move(locate(5,5,map1.z))

Another way to do this is with lists:
var/list/maps=list()
var/const/number_of_maps=10

world
New()
for(var/mapnum=1,mapnum<=number_of_maps,++mapnum)
maps+=locate("map[mapnum]")

proc/GetMapZ(int mapnum)
var/atom/map=maps[mapnum]
return map.z

(You could do this just by putting locate("map[mapnum]") right in the GetMapZ() proc, but I believe using a short list like this should be faster.)

Lummox JR