Procedural generated tile grid with arrays - How to do it?

Get help using Construct 2

Post » Mon Jan 05, 2015 11:24 pm

hi everyone.
So I was trying to learn how to work with arrays and tried to make a procedural generated tile grid, however and obviously, I still don't have the knowledge to do it.

I tried to create a grid lets say, with objects in the array's Y coordinate from 1 to 6. After that, i wanted to generate an object in Y =7 and the Y=1 line was destroyed (I managed to do this last part). But for the rest, it always started and endless loop generating objects from 1 to 6, then from 1 to 7, then 1 to 8... I don't know if I'm explaining the problema very well, so I'll send the project file.

Basically what I want is to create objects on the bottom side of the screen and destroy them in the upper part of the screen. Hope someone can help! :D
You do not have the required permissions to view the files attached to this post.
B
8
S
2
Posts: 12
Reputation: 583

Post » Tue Jan 06, 2015 12:01 am

Hi Ricardo,

I highly recommend the post R0j0hound made in the conversation below:

procedural-generation-using-the-quot-miner-quot-method_t67493

it looks like you have the right idea, however you may need to make some adjustments to the array values. For instance When I want to clear out a portion of the array, to make an open space, I can do this:

clear top of array.PNG


MapForeground is the name of my array, and I want to clear the entire width of the array to a depth of 10. (11 cells). I hope this helps!
You do not have the required permissions to view the files attached to this post.
B
11
S
2
Posts: 29
Reputation: 706

Post » Wed Jan 07, 2015 7:05 pm

that method is so much better! I managed to do what I needed, thanks :D
B
8
S
2
Posts: 12
Reputation: 583


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests