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.