[Help] Randomly Generated Dungeon

Discussion and feedback on Construct 2

Post » Thu Jan 16, 2014 3:57 am

So I'm trying to make some events that will basically randomly generate more tiles from the four image points if a random variable is equal to two, the problem is that it isn't happening. This is my event sheet below



After I get to the point of figuring out how to do this, my plan was to also have the tile ask if it is overlapping the bounds object, if so it would delete itself, would this be a problem in any way?
B
7
S
2
G
1
Posts: 28
Reputation: 881

Post » Thu Jan 16, 2014 4:35 am

I think what is wrong is case sensitivity. Your putting "Above" instead of "above" etc Try that for each action.
B
50
S
11
G
7
Posts: 274
Reputation: 8,146

Post » Thu Jan 16, 2014 4:51 am

Thanks for noticing that, I corrected it but it didn't seem to do anything.
B
7
S
2
G
1
Posts: 28
Reputation: 881

Post » Thu Jan 16, 2014 5:04 am

[QUOTE=pez263] Thanks for noticing that, I corrected it but it didn't seem to do anything.[/QUOTE]


Oh, make sure when you use random, that you round as well because your getting decimal values too. Like bellow, you round it to have just whole numbers.

round(random(1,2))PixelPalette2014-01-16 05:09:17
B
50
S
11
G
7
Posts: 274
Reputation: 8,146

Post » Thu Jan 16, 2014 5:32 am

This worked! Now I'm running into the problem of overlapping tiles, as well as the maps being pretty tiny. Destroying on overlap destroys both tiles, resulting in the map being destroyed as a whole, so I'm guessing I need to check whether or not the image point is overlapping or something. I've set the variables up to 4, and now it creates a tile if the variable is greater than 1, but the maps are still coming out very small. Any tips as to how I can solve these issues?
B
7
S
2
G
1
Posts: 28
Reputation: 881

Post » Sat Jan 18, 2014 9:54 am

You can also check if it's overlapping on an offset, instead of using image points, I think it's easier.

Also check this code by R0J0hound for generating random "rooms", maybe it'll help you:
http://www.scirra.com/forum/roguelike-map-system-untiled_topic51967_post327292.html#327292
B
123
S
43
G
41
Posts: 846
Reputation: 28,204


Return to Construct 2 General

Who is online

Users browsing this forum: Refeuh and 11 guests