Some maps I have added recently to my game aren't working at all. Usually I use z in locate(x,y,z) to send mobs to specific maps. However, the maps I have already had for a while are working fine while when I try to send someone to a new map they are sent to the void, as if the map doesn't exist.
The maps are all ticked in the DM file and they appear in the game's folder. I even tried assigning them to the front of my maps to test if I had hit some sort of max map quantity, but the new maps still failed even though their z in locate(x,y,z) was 1, while the old maps worked fine with their newly assigned numbers.
Does anyone know what's wrong?
As you may know, multiple .dmm files are compiled in one map with different z levels. The first z level will be the map that comes first in alphabetical order. For testing purposes, name one of the non-working maps "_1_map.dmm" and assign the player to locate(1, 1, 1). If it works, then you are simply inputting the wrong z when changing maps.
You can also cycle through the maps by doing the following: src.z = input("What level?", "Z Level") as num |
I found the problem. For some reason their Z location is 10 and 11 instead of 6 and 7. However I only have 7 .dmm files. Anyone know why it did this?
|
In response to Zerok Kaiba
|
|
Zerok Kaiba wrote:
I found the problem. For some reason their Z location is 10 and 11 instead of 6 and 7. However I only have 7 .dmm files. Anyone know why it did this? Do a clean compile. |
I have this same problem, and after following the advice in this thread, I can see that I have some blank z-levels on several of my maps. I've looked around and can't seem to figure out:
(1) How I got blank levels in the first place; (2) How to get rid of them. Can anyone point me in the right direction here? |
In response to OrionBPG
|
|
Open the map and go to Options > Set Map Size, and change the 'Z' value to the actual number of z-levels that you need.
|
Ahhh. Many thanks. I was under the impression that the z-level blank was for setting which z-level you wanted the map to set on.
|
In response to OrionBPG
|
|
Nope, it's the number of z-levels in each map.
At runtime, the actual z-positions for each map are determined alphabetically (ie in the same order shown in the file tree). So if you had these maps: mapA.dmm (1 z-level) mapB.dmm (3 z-levels) mapC.dmm (2 z-levels) The map at runtime would look like this: z=1: mapA-z1 z=2: mapB-z1 z=3: mapB-z2 z=4: mapB-z3 z=5: mapC-z1 z=6: mapC-z2 |
ex: You have the files A.dmm, B.dmm and C.dmm.
If you want the map order to be B (Z 1-3), C (Z 4-5), A (Z 6)
DM will reorder it to be A (Z 1), B (Z 2-4) and C (Z 5-6).
Make sure that the location you are sending to exists. You may want to output world.maxx/y/z to be sure you are not entering a # higher than what exists.
How are you moving the people, through Move() or directly changing the location? If you are doing Move(), double check any movement procedures (ex: Enter()) you may have edited.
Enter()/Exit()/etc. requires 1 to always allow an object to move, 0 always denies the movement. If you want DM to check other factors (ex: density for moving in/out), do return ..()
In most cases, Entered()/Exited() are the ones that should be used instead of Enter()/Exit() unless you are specifically trying to allow/deny something at all times.
What would be a larger help is posting a snippet of how you are moving your object so we can make sure its not a problem due to that.