You could do it just as you describe without the pathfinder.
Give the player sprite two variables: currentTarget=0 and goalTarget=0
Then give the square sprite one variable: targetId and number each instance, starting with 0, in the direction the board goes.
So the setup would be the player is placed on square 0. Then your events would look like this to move the player 5 spaces for example.
On start of layout
--- player: add 5 to goalTarget
player: currentTarget < self.goalTarget
square: targetId = player.currentTarget+1
--- player: set angle toward position (square.x, square.y)
--- player: move forward 100*dt pixels
player: is overlapping square
player: currentTarget < self.goalTarget
square: targetId = player.currentTarget+1
--- player: add 1 to currentTarget
I didn't take into account wrapping around the board or centering on the square but it's got the general idea.
thank you for your answer! the basic idea it is working so far
ht tp:// www114.zippyshare.com/v/i9L3657R/file.html
but there are a couple problems,
- in this example i could change the goaltarget to 4 instead of 5 and it would be the same result why?
- also, my idea was to let the player walk forward until he reaches the end of one "line" and than he shouldnt just set a angle towards he is supposed to rotate by 90° and than keep on working to the goaltarget
- another point is, the player is not walking exact, normally he should walk to the origin point of the sqaure means the center
i hope you can help me out once more
greets