Hi.
So I was using MoS map system for the pause menu.
The problem is, I am making a dungeon that have more then 8 floors, the maps are done, but if I put in dungeons.lua
[7] = {
floor_width = 2256,
floor_height = 2256,
lowest_floor = -4, -- can't go lower
highest_floor = 3, -- can't go higher
maps = { final_path .. "Dungeon/ETemple/Floor-7" }, -- final_path = value to check HMode, reversed map wise.
boss = {
floor = -4,
x = 1035, -- todo
y = 560, -- todo
savegame_variable = "b1046",
},
},
If lowest is inferior to -4 and highest is superior to 3, the map won't display, I got an error in highest_floor_display.
Tested with Mystery of Solarus, same result, the floor image allows 33 floors (34 if you include the "unknown" stairs)
There might be bug in the script. What error exactly?
First error when starting the menu
Error: In on_started: [string "menu/pause_map.lua"]:89: attempt to compare number with nil
And then this error loops
Error: In on_draw: [string "menu/pause_map.lua"] 290: attempt to perform arithmetic on field 'highest_floor_displayed' (a nil value)
Again, it only happen if the total floor number is > 8, if lower then it works.
Ok, I think the bug is that we should replace self.floor by self.hero_floor at lines 89 and 91. Please tell me if it works and then I will fix it in my games too.
Yes, your solution fixed the issue ;)
Edit : Wrightmat's pause menu had the same bug as well, fixed too.
(http://i.imgur.com/rXYwc7w.png)
Great, thanks.