I went ahead and created that tutorial for Jumper that I was talking about before. I strongly suggest you check it out for more info about the Jumper tech.
Specific to your problem, the pathfinding function doesn’t step through every step in the path. It just calculates the pathfinding needed and then executes it. You need to separate the animation function/movement function from the pathfinding function itself. My github fork has everything working the way you are attempted to have it run, so check it out and let me know if you have any questions.
EDIT: Here’s the gist explaining the movement logic:
local function movePlayer() -- moving actor with this function. It is called on a repeated timer and stops after the end is reached, as defined by the timer with the Lua closure below. print("BEING CALLED NOW") if movingHere then print("number of values in setX is "..#setX) print("number of values in setY is "..#setY) print("aMX value is "..aMX) print("aMY value is "..aMY) print("setX = "..setX[aMX]) print("setY = "..setY[aMY]) print("-------------------") hero.x = cellb[setY[aMX]][setX[aMY]].x hero.y = cellb[setY[aMX]][setX[aMY]].y cellb[setY[aMX]][setX[aMY]]:setFillColor(.5,0,.25) flipSize(cellb[setY[aMX]][setX[aMY]]) aMX = aMX+1 aMY = aMY+1 if setX[aMX-2] and (setX[aMX-1] \> setX[aMX-2]) then hero:setFillColor(1,1,0) end if setX[aMX+2] and (setX[aMX+1] \> setX[aMX+2]) then hero:setFillColor(1,0,1) end if setY[aMY-2] and (setY[aMY-1] \> setY[aMY-2]) then hero:setFillColor(.5,0,.5) end if setY[aMY+2] and (setY[aMY+1] \> setY[aMY+2]) then hero:setFillColor(0,.5,1) end --return true end end