Map Instancingby Forum_account |
To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Forum_account.MapInstancing##version=5 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Forum_account.MapInstancing##version=5 An easy way to create multiple instances of a map. Each instance is put on its own z level. [More]
|
Advertisement Forum_account: (Jan 8 2012, 1:39 pm)
The saving and loading was added as an afterthought because it was easy to add. If there are more features that could be added to help you with this problem that you think could belong as part of the library, let me know =)
KetchupKid: (Jan 8 2012, 1:37 pm)
I think you may be right on #1. I'll look into it. Its setup this way so that it will save the maps when I have them all included and load the saved maps when I don't have them included. But I think its just saving every time.
Forum_account: (Jan 8 2012, 1:33 pm)
I'm not sure how that New() proc is being called, but I'm guessing the problem is somewhere in there.
When you're calling it, if the if statement is true it doesn't make an instance of a map, it just creates a base and saves it. It only makes a copy of the if statement is false. If it's not working, I'd guess that either: 1. The else clause in the New() proc is never being executed. 2. The map isn't being saved or loaded properly. To troubleshoot #1 you just need to change your code. To troubleshoot #2 you'd have to edit the library's code. There's not much code to it. You'd just need to add some output statements to the MapBase object's constructor to make sure it's getting created and getting created properly, and add some output statements to its make() proc to see what is happening when an instance is being made. KetchupKid: (Jan 8 2012, 10:52 am)
When loading a saved map, it loads a black blank map. I can't figure out what I'm doing wrong.
[Edit] It also doesn't display a z level when calling world << map.z, its just a blank output line. |
Copyright © 2013 BYOND.
All rights reserved.

Right now I'm reading through the library again. But I still don't know whats going wrong. If I can't figure it out soon, I'll probably go back to regular maps. I just liked the idea of having all my maps at 1kb.