ID:1666684
 
(See the best response by Ter13.)
Code:


Problem description: So i was hoping that if i had a z plane of 5. And i wanted to remove the z plane in the 3rd position for example that there was an easy way. From my knowledge what id have to do is subtract world.maxz and replace the previous max z into position 3. In essence id have to copy the final z plane and copy it into the 3rd plane and then subtract the maxz essentially getting rid of anything that was in the final plane and anything that was in the third plane is now what was the final plane. Of course this seems like it would take a lot of resources and players might notice.

If this makes sense can anyone help please. is this the only way to do it? or can your litterally delete a z plane at a specific number


Best response
the way you describe is the way to do it.

Though, there's a riskier way to do it. Open the map in notepad. Select and delete the layer you want to remove. Then renumber the subsequent Z-layers' identity blocks.

(1,1,1) = {"
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
"}


(1,1,2) = {"
bbbbbbbb
bbbbbbbb
bbbbbbbb
bbbbbbbb
bbbbbbbb
"}


(1,1,3) = {"
cccccccc
cccccccc
cccccccc
cccccccc
cccccccc
"}


Delete block 2, and rename block 3 to block 2:

(1,1,1) = {"
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
"}


(1,1,2) = {"
cccccccc
cccccccc
cccccccc
cccccccc
cccccccc
"}


Make sure you save a copy of your map before you do this, because you could wind up corrupting the DMM.
I think the question is wrong. There are workarounds for you to not have to do this, like keeping a list of active z-levels. If you're using map instancing, you would create new maps in the first inactive level after clearing it, rather than always increasing world.maxz and loading the map at the last level.
In response to Kaiochao
how would i do this
In response to Kaiochao
well to be more specific how do i create more maps without loading a map onto the next z level. or are you saying create new maps but dont delete them, just put players into the inactive ones?
In response to Anthonytyran
Keep track of which levels are inactive. When you want to load a map, find the first inactive level. Delete the stuff in it, then load the map onto it. If there aren't any inactive levels, then add to world.maxz.

I said you don't "always" add to world.maxz. Only do it if there's no more room.