New Names for Walls
#PanicRoom Day 103
#100DaysOfGameDev R2D68
#100DaysOfCode R2D68
After punching in all the code to get the second set of Room Analyzer going yesterday, today I sat down to fix it and make it run properly. I just went down through the lines I added and gave them a good once over. While I did manage to switch out all my variables to the proper ones for this type of Primary Hallway orientation my error was in reversing two key variables, which is where the strange wall build was coming from. An easy fix.
With that remedied I noticed something else while debugging that would need my attention. While all my wall pieces were getting named according to when and where they were built, all these room-dividing walls were beginning to be hard to distinguish from one another if there were a lot of them being created. I wanted to be able to differentiate between the original Room Block Divider wall and all subsequent Room Divider walls. To this end, I came up with a way to pass a name for each wall piece based on which Room Analyzer it was being built in by utilizing a new wallPlace String Variable. By passing this string I could create walls and name them for where they were and for what purpose they were serving, such as Aa, Ab, or Ac when those rooms were split. It made debugging a lot easier when I needed to directly select a wall piece from the Scene to see more information about it.