How do I repeatedly check and handle instance variables?

Get help using Construct 2

Post » Tue Oct 17, 2017 11:00 pm

Message: kellehk can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hey everyone.

Here's my capx:

I'm trying to make a connect the dots game using a hex grid.
Long story short, I have a grid of "cell" objects with instance variable "IsEmpty"
The grid is filled with colored "Dots" which get destroyed when the player connects dots of similar colors.
When a dot is destroyed, its associated cell is set to empty.
I then have a function that selects the cell above, takes the dot inhabiting it, and moves it down to the empty space.

(Note: I want the dots to move in a zigzag like pattern down, so in a 6x6 hex grid, for example, a dot from the 6th hexagon will fall into the 12th hexagon; this explains my logic in selecting the dot)

I have a special handler for the top row, where empty spaces will be filled by "spawn" points above.
I would like this to keep repeating until the grid is full, but for some reason the dots stop moving even though there are still empty spaces on the grid.

I think I'm having trouble with checking the empty cells every tick. Not really sure what event to use. I tried "For each empty cell," and "pick cell where cell is empty," I even used a number variable to try to count the number of empty spaces, but that didn't seem to work.
Posts: 36
Reputation: 488

Post » Wed Oct 18, 2017 3:15 am


Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
Posts: 2,401
Reputation: 84,429

Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 0 guests