ID:158648
 
I dont know how to name it, so i cant really find it but what kind of process would it be to switch map files during the game, is there any demo on it in the library?
Map files are compiled on top of each other. They have their own Z levels, ordered alphabetically.
In response to Kaiochao
Kaiochao wrote:
Map files are compiled on top of each other. They have their own Z levels, ordered alphabetically.

You mean like...
If i include 2 map files with only 1 Z level, will they just be merged into Z level 1 and 2
it depends on what your talking about, if your talking about switching between .dmm files, that would be more tedious than doing this

turf
Leave
density = 0
Enter(A)
if(ismob(A))
var/mob/M = A
if(M.client)
M.loc = locate(1,1,2)//or whatever
else
if(istype(A,/obj/)) del(A)


which just moves you to the next "Z" layer (the maps work like sheets of graph paper stacked on top of each other)


In response to Gogeta126
your game will run much quicker if you only use one map with multiple "Z" layers instead of multiple maps with one "Z" layer

Also, it would be much more simple (coding wise) if you were to just recreate the other map on say, "Z" layer #2 on the first map ^_^
In response to RanEsu
hmm i wanted to get maps on separate sheets, so i can load the map manually for all players in game(changing map, just like in shooter games(cod, CS, whatever)
In response to Gogeta126
something like Darker Emrld's RE game??
In response to RanEsu
havent played.
Just so the host can load a new map file. A verb.
In response to Gogeta126
this may not work properly for what your trying to do but, try this

mob
gm
verb
summon_players()
switch(input("What Map?", text) in list ("blah","blah2","ect.","oops")
if("blah")
//nitty - gritty code for summoning all palayers goes here
//have them all located to a start point at (x,x,1)

if("blah2")
//nitty - gritty code for summoning all palayers goes here
//have them all located to a start point at (x,x,2)

if("ect.")
//nitty - gritty code for summoning all palayers goes here
//have them all located to a start point at (x,x,3)
if("oops")
return


//you get the picture??



In response to RanEsu
Also, a good way to keep track of what map is where is to not use coordinates at all. Use an anchor object with a unique tag variable you can use locate() on to automatically find it.
In response to Kaiochao
Kaiochao wrote:
Also, a good way to keep track of what map is where is to not use coordinates at all. Use an anchor object with a unique tag variable you can use locate() on to automatically find it.


isnt their a demo for that?
In response to RanEsu
Well, that would work when loading a different Z level, i want to load a whole new DMM file
In response to Gogeta126
Like was said about twice before, DMM files are stacked onto new Z levels in alphhabetical order.
And as I said, use tagged object references. It makes jumping between maps a whole lot easier.
In response to Kaiochao
Kaiochao wrote:
Like was said about twice before, DMM files are stacked onto new Z levels in alphhabetical order.
And as I said, use tagged object references. It makes jumping between maps a whole lot easier.

I dont understand what you mean by "new Z levels."

so if i include 2 maps with 1 Z level they will be together in 2 Z levels? 1 and 2?
In response to Gogeta126
Yes. But as I said, you should use tags instead of Z numbers.
In response to Kaiochao
Kaiochao wrote:
Yes. But as I said, you should use tags instead of Z numbers.

I see, alright i'll look into that.
Thanks
In response to RanEsu
I'm failing to see why there should be a demo for using a single, built-in variable.

I guess you can look it up in the reference: http://www.byond.com/docs/ref/info.html#/datum/var/tag
In response to RanEsu
Enter() is the wrong proc to be using here. You should be using Entered() instead.