Isolate Posted May 8, 2014 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...
Th3 Posted May 8, 2014 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
Isolate Posted May 8, 2014 Author 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