How do I creating 9 squares in a single grid?

0 favourites
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • Hello Constructors!

    I really need help with creating 9 squares in a single grid.

    Currently i have a game which has a single grid like IMAGE-1, the goal of this single grid is to fill with blocks one line horizontal or vertical and gets score but i would like to implement the 9 squares in single grid like showing in IMAGE-2:

    The goal of 9 squares in a single grid is to fill either a whole horizontal line, a whole vertical line, or one of the nine squares of a grid.

    Your response in this regard will highly be appreciated. I would be very very thankful to you.

    Thanks in advance.

  • This is an example that I made: imgur.com/a/MLXtVPA

    Note: You should resize the square with your purpose.

  • Thank you very much its help me alot.

    One another favor need from you if you could kindly help me with it that is:

    How could i set the goal of 9 squares in a grid is to fill either a whole horizontal line, a whole vertical line, or one of the nine squares (I mean when 1 square is complete of blocks and it scores)` of a grid.

    The horizontal line and vertical line are set already but the one square logic is not set.

    Showing in image the one red highlighted square, if this one square is complete of given blocks so it scores and the blocks remove.

    If you would like i will share you the capx file?

  • Yes, please send me your capx

  • Hello dear, Have you find a solution. I uploaded the capx file.

  • Yes, I received the file and I need time to check the event sheet :)

  • Sure take your time.

  • There you go:

    drive.google.com/open

    I edited with r194.

    Found issue: can't match with row/height with square at the same time.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh its in C3, could you please send me this in C2

  • I am not using C2 so these are the screenshots that I changed:

    1) Create 9 squares:

    2) Reuse function Check() and modified it to CheckSquare()

    3) Check if all blocks inside the square and game will remove + add score for them

    Please let me know if anything unclear.

  • Its good i have created the same code as you showed above, but i am getting this see in image, its not start from where the tiles start, how could i start it from the first tile?

    And the blocks are not fitting in sqaures.

  • I forgot that I changed the width and height to 8, so you will have 9 columns and 9 rows.

  • I am not using C2 so these are the screenshots that I changed:

    1) Create 9 squares:

    Please let me know if anything unclear.

    Hi are you able to explain the first part of image number 3 where it checks for matching square. I am keen to understand the bit that says

    for each squares

    square is overlapping block

    Since the square is always moved to bottom layer so would be behind the block, what is this check doing?

    Thanks

  • I checked if the blocks inside the square equal 9, then set all blocks is matched.

    The check function is using from the example, it runs a loop to check the tiles that overlaped by block which is matched and destroy them.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)