You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. The code I have provided do not return any Points.
2.
3.
What is the expected output? What do you see instead?
An array with non diagonal points / An empty Array.
What version of the product are you using? On what operating system?
1.2 / W7
Please provide any additional information below.
First thing first. Great job with Dijkstra's algorithm!
Well, maybe I have misunderstood something here but I need to get the
Points/steps between A & B. When I pass in "diag = true" it seems to work, but
when I pass in false the getPath() function do not return any points. Any
suggestions? Thanks!
var map:Array = [[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 1, 0, 0, 0, 0, 0, 0]];
var pt:Pathfinder = new Pathfinder();
pt.loadMap(map, 10, 10);
var path:Array = pt.getPath(new Point(1, 1), new Point(8, 8), false);
Original issue reported on code.google.com by ralf.him...@gmail.com on 20 Oct 2011 at 3:29
The text was updated successfully, but these errors were encountered:
I am using the above example, it works
except for if i change this line
var path:Array = pt.getPath(new Point(1, 1), new Point(8, 8), false);
to
var path:Array = pt.getPath(new Point(0, 0), new Point(9, 9), false);
I want to get the path from one corner to the other, it returns
"TypeError: Error #1010: A term is undefined and has no properties.
at Pathfinder/getPathArray()
at Pathfinder/getPath()"
Which is 'if (i < dimensionX && tmpMap[i + 1][j] == iteration)'
The tmpMap[i + 1][j] is empty, it applies to most if functions in the
getpatharray because with some paths, tiles next to the destination are
non-existant, is there a quick fix for this?
Thank you
Original comment by crisyfal...@gmail.com on 1 Jan 2015 at 10:31
Original issue reported on code.google.com by
ralf.him...@gmail.com
on 20 Oct 2011 at 3:29The text was updated successfully, but these errors were encountered: