In Tonypa’s tile map tutorials, he names his map arrays myMap1, myMap2, and so on. He sets currentmap to 1, and then calls his map building function with buildMap(_root[“myMap”+game.currentMap]); so he can just change the currentmap number when he goes to a different room.
I think it’ll be hard to remember which map “myMap1” corresponds to. What I want to do is make it so I can name my map arrays things like Castle and Town, and call it with something like buildMap(//name of map array);
I’ve tried a few different ways, but none of them work. What’s the best, simplest way to do this?