I'm running into some problems with swapmaps. I tested a bunch of stuff on the swapmaps library itself but when I try to implement these things in my game it doesn't work.
First of all I don't declare turfs, I just use the map editor to import all the turfs I need. Do I have to declare turfs to be able to use swapmaps[Swapmaps puts all turfs and object paths into a txt file. If there is no path, how can it work]?
Using the DM map editor I made a house template. How do I make swapmaps use that house template?
Sep 15 2014, 12:58 pm
|
|
forum account's map instance works pretty well
|
CGR2 wrote:
forum account's map instance works pretty well Forum_account.MapInstancing only saves the type paths, so it won't work for map instance types (by which I mean types defined within the map, not separate copies of the same map). LummoxJR.SwapMaps should save any non-initial/non-tmp variables along with the map, which *should* pick up the changed icon/icon_state of your map instance types. Can you show us how you implemented SwapMaps in your game? |
House I'm not sure how to create a swapmap out of a precompiled DM map. It says "new(id, turf/corner1, turf/corner2) Create a new map based on a region of the compiled-in game map. (If the corner turfs don't fall within the boundaries of the original game map, the datum will be deleted.) This map is used for saving only. On deletion or unloading, the atoms within this map will not be destroyed. " but it doesn't work. SmallHouse is the map name. c1 is the top x coord, c2 is the top y coord. |
What do you mean by that? I always get this error;
proc name: AllocateSwapMap (/swapmap/proc/AllocateSwapMap) usr: Ryim (/mob) src: /swapmap (/swapmap) call stack: /swapmap (/swapmap): AllocateSwapMap() /swapmap (/swapmap): New("SmallHouse", "turf/test wall 2", "turf/icon-roof4", null) /House (/House): Create(Ryim (/mob)) Ryim (/mob): Build House() runtime error: type mismatch: cannot compare "turf/icon-roof4" to 1000 proc name: Del (/swapmap/Del) usr: null src: /swapmap (/swapmap) call stack: /swapmap (/swapmap): Del() /House (/House): Create(Ryim (/mob)) Ryim (/mob): Build House() |
Instances are not the text string of the turf. You can get an instance by using loc(tag) or loc(x,y,z) or loc(path) - or any other ways to pull instances out.
|
K, I've been working with it and it I can't seem to get it to form another instance of the same house.
House It doesn't actually make another instance of the map, it should shouldn't it? Doesn't make a swapmaps save of the map either. |