Isolate Posted May 8, 2014 Share Posted May 8, 2014 Well all walking snippets ive seen only handle Position[] but all generating scripts all output in ArrayList/List. Google told me too: ArrayList<Position> positionsList; Position[] asPath = new Position[positionList.size]; asPath = positionsList.toArray(asPath); //or something like this and when i tried that it never seemed to work when it got to the walking function... Link to comment Share on other sites More sharing options...
Th3 Posted May 8, 2014 Share Posted May 8, 2014 (edited) Well all walking snippets ive seen only handle Position[] but all generating scripts all output in ArrayList/List. Google told me too: ArrayList<Position> positionsList; Position[] asPath = new Position[positionList.size]; asPath = positionsList.toArray(asPath); //or something like this and when i tried that it never seemed to work when it got to the walking function... Position[] asPath = positionsList.toArray(new Position[positionsList.size()]); Edited May 8, 2014 by Th3 Link to comment Share on other sites More sharing options...
Isolate Posted May 8, 2014 Author Share Posted May 8, 2014 Position[] asPath = positionsList.toArray(new Position[positionsList.size()]); did just figure this out, yet to test it though, thanks for the response Link to comment Share on other sites More sharing options...