Question about touch-based movement?

Hi,
I'm new in gamesalad and building my first iphone game. I'm stuck with mouse touch based movement.
What I'm talking about take a look at this one
http://arcade.gamesalad.com/g/37314
So when i tap on my actor it need's to move on second empty space. I will have like 30 rectangle shape actors and two empty spaces. I already tried using several templates (snap to grid,table movement...) and no use.
Are there any templates for puzzles? Can you please help me guys?
I'm new in gamesalad and building my first iphone game. I'm stuck with mouse touch based movement.
What I'm talking about take a look at this one
http://arcade.gamesalad.com/g/37314
So when i tap on my actor it need's to move on second empty space. I will have like 30 rectangle shape actors and two empty spaces. I already tried using several templates (snap to grid,table movement...) and no use.
Are there any templates for puzzles? Can you please help me guys?
Comments
well, you could set up attributes for *free1(integer)* *free2(integer)* *free1(boolean)* *free2(boolean)*. Then have a "detector square" on each possible spot, and customize their names to 1-32. start att. *free1(I)* at one of the starting square numbers, and att. *free2(I)* at the 2nd free spot. Set att. *free1(B)* to false and *free2(B)* to true. Set the rules for the detectors so that when collide with actor tag puzzle piece then do nothing, otherwise when free1(B) is true change att. free1(I) to square number att. free1(B) to false and att. free2(B) to true. make another rule under "otherwise" the same except for swith the 1 for 2 and 2 for 1.then go to the puzzle piece and set rules so that when it is on square (A) and free1(I)=(B) move to (B.X,B.Y). This part might take awhile as there will be many possible combos to enter. (BTW you might want to place detectors in order like rows going left-right top-bottom so you can easily track which numbers to enter in