I followed a tutorial to create a procedural generating dungeon map. It works perfectly if I start the game on the dungeon level, but if I start on the main menu and go to the dungeon layout, it doesn't do the entire generation.
The flow for it is that it fills the map with the 'wall' sprite, then spawns in room and hall markers, then deletes the walls that aren't trimming a room or hall, finally spawning in monsters, items and the player.
When I start on a different layout and go to it, it gets as far as spawning the room centres (used for calculating where to put the hallways), then stops.
This is the tutorial I used : construct.net/en/tutorials/procedural-dungeon-generation-a-roguelike-game-708
I stripped out my variations on it and what I'm not using is a word-for-word copy of this tutorial, and this hasn't addressed the issue at all (slowly re-adding my tweaks lol)
Can someone help me figure out what's going wrong?
I've tried changing it from Sys>On Start of Layout to Sys>On Loader Layout Complete, but that didn't work. I also tried having a variable control whether or not to run the generator, and that also didn't work. Perhaps there's something up with the way I'm switching layouts? (I'm using Sys>Go to layout)
Any input would be much appreciated, given this is my college assignment lol