Quote:
It wouldn't happen with the mapper of a graphical game where the map is drawn automatically.
Graphical games don't have illogical room layouts, you couldn't draw them. Your fix sounds sensible for games that have logical layouts.
Quote:
function getReverseDir ()
if last_direction_moved == "n" then
return "s"
end
if last_direction_moved == "s" then
return "n"
end
if last_direction_moved == "w" then
return "e"
end
if last_direction_moved == "e" then
return "w"
end
end
Or:
reverse_direction = {
n = "s",
s = "n",
e = "w",
w = "e",
u = "d",
d = "u",
ne = "sw",
sw = "ne",
nw = "se",
se = "nw",
} -- end of reverse_direction
function getReverseDir ()
return reverse_direction [last_direction_moved]
end -- getReverseDir
Quote:
... but it doesn't do anything, what am I missing?
That code gets executed for new rooms (not ones already saved). You look like you are doing the right thing. Does it not work for new rooms?
Quote:
Is there a list of commands/variables for the mapper somewhere that could help?
The start of mapper.lua lists exposed functions and variables.
|