How to make a Grid for a game

Thanks so much for your help…

Your tutorial was so helpfull but I have a question:

After I build my Grid how can I hide some of my images in the gri?? I explain myself better.

I ve a grid 10 x 10 but i want that the images at the position   x = 3 y= 4   ,    x=5 y= 6  ,     x=10 y=10,       x=1 y=1     have to be invisible. How can I select only these 4 images??

Thanks in advance :slight_smile:

Kind regards

Betlab

In a nutshell, you need to keep track of the grid objects – putting them into a table is an easy way to do that.

As you build the grid you’ll just add each new object to the table and then you can access it later by index:

myGridObjs[14].alpha = 0

That would hide the object that’s in the 14th position.

Doing this would make a good extra video. I’ll see if I can’t whip that up this afternoon and add it to the course. But go ahead and poke at it yourself. :slight_smile:

 Jay

Oh thanks a lot. Yes I try to do it by myself. But when you finish your tutorial can you please share it with me ??

The new video is in the course.

When you’re logged in you can access it here:

http://masteringcoronasdk.com/game-dev-lesson/bonus-programmatically-access-objects-in-the-grid/

Hope that’s what you were looking for. :slight_smile:

 Jay

Your tutorial  is perfect . And you are literally my hero. :slight_smile:

Thanks very very much