Detecting adjacent table values
I'm working on a game where the player matches tiles which are dropped from the top of the screen.
The tiles are all tracked by by a table, which records the internal ID of the tile itself (an integer between -1 and 10) in its correct position. I can make it so that tiles are detected when they are in a line (horz and vert) but I cannot for the life of me figure out a solution where the target number (let's say, at least 5) is detectable in any other configuration.
Each tile rests on a "frame" actor which reacts to the game by changing color, etc, and is also tied to the same table values as the tiles above. Is there a (resource-friendly) way I could use those actors to check my table for correct solutions? Or any other way to achieve my goal?
Ex:
<------ This works.
<------ This does not.
Comments
So you're wanting to detect 5 identical values that "touch" anywhere in a table? I could be wrong but I think you'd have to use a path finding algorithm to do that.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
That's what I was afraid of. Oh well! Thanks for that confirmation.