Over my morning coffee decided to add some debug info (the Mouse Debug Info) so that it would show the ParentX and ParentY to be sure everything was correct. Funny thing was all the Parent Info was set correctly.
Decided it had something to do with tracing the path.
Changed this when tracing the path.
Nodes[CurrentX, CurrentY].OnPath=1
CurrentX = Nodes[CurrentX, CurrentY].ParentX
///// CHANGED THIS //////
IF CurrentX > StartX
CurrentY = Nodes[CurrentX+1, CurrentY].ParentY
ELSEIF CurrentX < StartX
CurrentY = Nodes[CurrentX-1, CurrentY].ParentY
ELSE
CurrentY = Nodes[CurrentX+1, CurrentY].ParentY
ENDIF
///// ^^^^^^ ////////////
If CurrentX = StartX and CurrentY = StartY
PathSelected=1
Endif
Works great now, some sort of offset bug going on. May have something to do with the screen percentage system. (One of the reasons I like using SetVirtualResolution, so I can work in pixels.)
I have also attached the version I was working with, Changed things around a bit, but the part that should be useful is how the OpenList was implemented. That way you do not need to search the entire map for the best F score. On my Android Tablet, getting and average of 0.05 seconds to find a path. Can get upto 0.20 seconds in certain areas, such as to the right of the right most building.