ID:273150
Oct 27 2009, 8:40 pm
|
|
Okay, let's say that I have a map on my second "z" level that I want to copy to another "z" level. Is there an easy way to do this, or do i have to check the type of every atom individually a create a function to duplicate every atom that way. Or is there a simpler method.
|
Oct 27 2009, 8:54 pm
|
|
Use the select tool in the map editor to select everything then press ctrl+c to copy then go to a different z level and press ctrl+v to paste.
|
In response to Zaltron
|
|
I mean with code...
|
In response to Mr.Tophat
|
|
Mr.Tophat wrote:
I mean with code... mob/verb/CopyZLevels() |
In response to Zaltron
|
|
new a.type(locate(x, y, zLevel2copyTo))
[erased] ^ what was i was kinda looking for Hrm, but even that code failed to create new turf and areas... on the different Z level |
In response to Schnitzelnagler
|
|
SwapMaps? I'll read into it, I've been away from Byond for a long time
|
In response to Mr.Tophat
|
|
Yes, sorry, thought you had been pointed at Lummox JR's SwapMaps Library in another posting already, but I guess I got confused and mixed up names.
Sorry, my apologies. |
In response to Mr.Tophat
|
|
It should not have a problem with the turf part. I would have gone about it slightly different though.
// copies turf&area from z1 to z2 Inside the for loop, you could add some other things if you want more aspects of the turf cloned, such as overlays/underlays, contents, etc.. If you clone contents, remember that you have to make clones of the contents of the original turf as well, and make sure you handle cloning them properly if you don't want reference issues or player-connection problems. |