Maze Generation Problem

Get help using Construct 2

Post » Sun Mar 18, 2012 5:05 am

If you look at this generator, it will create a blue solid wall on the south and east sides of the layout but it will not do it for the north and west sides. I've been tinkering with the code and I can't still figure how to make this happen. I've been on this problem for two days, can anyone help please? Thanks

http://dl.dropbox.com/u/5426011/examples%209/mazegen.capx

Maze Gen post
B
6
Posts: 14
Reputation: 478

Post » Sun Mar 18, 2012 1:41 pm

I'd ask @Yann. He is the maze guy around here ;)sqiddster2012-03-18 13:41:52
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Sun Mar 18, 2012 1:59 pm

You need 2 things :
- the size of your array to be odd numbers
- your starting coordinate of the algo to be odd as well
So make the Array size 39,29
And event 3 replace the 2 first actions by:

[code]System: set x to floor(random((Array.Width-1)/2))*2+1
System: set y to floor(random((Array.Height-1)/2))*2+1[/code]
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Mar 18, 2012 4:40 pm

That worked perfect! Thanks a bunch!
B
6
Posts: 14
Reputation: 478

Post » Mon Apr 02, 2012 3:07 am

@Yann, if I wanted to make the walls more than 1 thicker, how would I be able to do that?
B
6
Posts: 14
Reputation: 478


Return to How do I....?

Who is online

Users browsing this forum: Ashley and 18 guests