ID:175506
![]() Apr 13 2003, 1:41 pm
|
|
How do you save obj on the map? Is there a built in proc or do you have to make one yourself?
|
![]() Apr 13 2003, 6:04 pm
|
|
Can someone please show me how to make a very simple savefile for an obj and or turf i only need the save to remember location and var/Owner. Please Help
|
Well, you could use SwapMaps. But if you don't want to do that...
Obj saving: http://developer.byond.com/hub/Super16/OBJSAVING To save turfs, do the following: (I'm assuming you know how savefiles basically work.) - Loop through all the turfs in the world - Save an entry into the savefile for that turf, listing the x, y, and z coordinates. Put the type of the turf into it. So you'd do something like <code>S["[T.x]_[T.y]_[T.z]"] << T.type</code> When you want to load, it's nearly the same: - Loop through all the turfs in the world - Get the entry for that turf and place its value in a temporary var - Make a turf of the type contained in that var. Place it at the appropriate coordinates. (P.S. Are you the guy who came into Chatters and asked me about this? =P ) |
Thank you, I got banned from chatterz cus Maz was Tyring to help me with a prob i had, he was no help at all he just fixed my tabs but there wasnt anything wrong with them i just showed the code i used on the forum and it didnt show the tabs right when i copied and pasted, i told him that over and over but he wouldnt listen and continued to fix them and he said i didnt know how to code so i told him to shut up. I'm not a good coder but most the time i can figure it out.
|