That's pretty cool. I've played around a bit with some random dungeon generator ideas, and they can get quite complex. I've decided to use Python for such a thing, unless it's pretty simple.
A couple of notes about this come to mind. I noticed that you had trouble with setting a global variable to the user-input room number, and just set it to a static 99 instead. This can be done by coercing the string value into a numerical value by using the system expression int() or float(). In this case, you'd prefer an integer over a floating point number, so you can do it like so:
+ cmdGenerate: On cmdGenerate clicked
-> Wall: Destroy
-> Ground: Destroy
-> System: Set global variable 'NumRooms' to 0
-> System: Set global variable 'MaxRooms' to int(txtNumRooms.Text)
-> Function: Call function "MakeFirstRoom" (and Forget picked objects)
Also, I noted that a 100-room dungeon ends up creating around 5,200 wall tiles and 15,300 ground tiles, then reduces the number of wall tiles to 400-700 or so after destroying the ones that overlap ground tiles. This leaves a lot of 'stacked' ground tiles that are unnecessary. It also may need two passes to remove all of the extra walls, since it's doing all of that in a single tick, and Construct only updates such changes at the end of the tick.
I would probably avoid creating all of the extra tiles by using the system condition object overlaps point to test of a tile already exists at the current drawing location. Putting the wall and ground tile objects together into a family (say, 'blue') would simplify things. Then the drawing part could be done something like so (in pseudocode):
if (wall tile):
if (family blue does not overlap drawing location):
draw wall tile
if (ground tile):
if (wall tile overlaps drawing location):
destroy wall tile
if (family blue does not overlap drawing location):
draw ground tile[/code:3l5u20o5]
That assumes that the wall tiles will be destroyed instantly, and the next check will not see a 'blue' there afterward. I'm not sure if that's the case, but otherwise one could add another 'draw ground tile' after the 'destroy wall tile', I guess.
Any rooms that are inaccessible at the end could be dealt with by running through all walls with a 'for each wall', and checking for the presence of a ground tile either [i]both[/i] north and south of it, or [i]both[/i] east and west of it, and replacing the wall tile with a ground tile if either is true.
Of course, there are tons of other things that one could do with it, too. But it starts to become a beast at some point along that road.