I am attempting to create a randomized dungeon in my game. Firstly, I iteratively clone a master tile according to the size of the dungeon, and gave each clone specific coordinates. After running an algorithm that decides which tile will be a corridor, room or wall, I used the
create exit function to link the tiles accordingly. A room tile is randomly chosen, and a one-way exit, going 'in', is created from the dungeon_entrance room to the selected tile.
However, the problem that I am facing is mapping out the resulting dungeon. The map works fine until entering the dungeon. When moving between the cloned tiles, nothing observable happens at the map display. The player icon remains at place, with no new rooms being drawn out. To me, it seems that the map fails to recognize that the player object has moved when moving to a cloned room.
In short, how do I get the map to draw itself when moving between cloned rooms?
The map relies on the type of the exit, not its alias.
There are three different forms of the create exit command:
create exit (alias, from, to)← Unless it's changed since last time I tried it, this one doesn't work with maps
create exit (alias, from, to, type)
create exit (name, alias, from, to, type)
In order to work with maps, you need to use one of the ones with a "type" parameter. The type should be "northdirection", "southdirection", "westdirection", etc.
Thanks mrangel, the map works perfectly now! I've been stuck at this problem for too long, and the solution is so simple
Jay (Jaynabonne) already has made a dungeon randomizing code/library (if you can't find it, let me know, and I'll find/get it/the-link for you --- look in the 'code samples and libraries' forum board section, if the searching feature doesn't work)