syyfilis Posted April 8, 2015 Share Posted April 8, 2015 Hello, for some reason my localWalker.walkPath(pathToBank); just stops after 4th checkpoint. What might be the reason? Here is the code? Position[] pathToBank = new Position[14]; public void initPathToBank(){ pathToBank[0] = new Position (3215,3260,0); pathToBank[1] = new Position (3216,3257,0); pathToBank[2] = new Position (3216,3252,0); pathToBank[3] = new Position (3219,3245,0); pathToBank[4] = new Position (3221,3241,0); pathToBank[5] = new Position (3224,3237,0); pathToBank[6] = new Position (3230,3231,0); pathToBank[7] = new Position (3232,3221,0); pathToBank[8] = new Position (3225,3217,0); pathToBank[9] = new Position (3219,3245,0); pathToBank[10] = new Position (3219,3218,0); pathToBank[11] = new Position (3214,3217,0); pathToBank[12] = new Position (3215,3211,0); pathToBank[13] = new Position (3219,3245,0); pathToBank[14] = new Position (3209,3209,0); pathToBank[15] = new Position (3206,3209,0); } public void onStart(){ initPathToBank(); } public int onLoop throws InterruptedException(){ localWalker.walkPath(pathToBank); localWalker.waitUntilIdle(); } Quote Link to comment Share on other sites More sharing options...
Apaec Posted April 8, 2015 Share Posted April 8, 2015 easier to define it as Position[] pathToBank = new Position[]{new Position(0,0,0), new Position(0,0,0), new Position(0,0,0)}; etc. Also, in terms of the walking, try and space the points 2-3 tiles away from eachother to ensure they dont get stuck. I've converted a tool which records paths for you (found here: http://osbot.org/forum/topic/61609-path-generator-zwalker-portre-release/ ) Apa Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted April 8, 2015 Share Posted April 8, 2015 Hello, for some reason my localWalker.walkPath(pathToBank); just stops after 4th checkpoint. What might be the reason? Here is the code? Position[] pathToBank = new Position[14]; public void initPathToBank(){ pathToBank[0] = new Position (3215,3260,0); pathToBank[1] = new Position (3216,3257,0); pathToBank[2] = new Position (3216,3252,0); pathToBank[3] = new Position (3219,3245,0); pathToBank[4] = new Position (3221,3241,0); pathToBank[5] = new Position (3224,3237,0); pathToBank[6] = new Position (3230,3231,0); pathToBank[7] = new Position (3232,3221,0); pathToBank[8] = new Position (3225,3217,0); pathToBank[9] = new Position (3219,3245,0); pathToBank[10] = new Position (3219,3218,0); pathToBank[11] = new Position (3214,3217,0); pathToBank[12] = new Position (3215,3211,0); pathToBank[13] = new Position (3219,3245,0); pathToBank[14] = new Position (3209,3209,0); pathToBank[15] = new Position (3206,3209,0); } public void onStart(){ initPathToBank(); } public int onLoop throws InterruptedException(){ localWalker.walkPath(pathToBank); localWalker.waitUntilIdle(); } easier to define it as Position[] pathToBank = new Position[]{new Position(0,0,0), new Position(0,0,0), new Position(0,0,0)}; etc. Also, in terms of the walking, try and space the points 2-3 tiles away from eachother to ensure they dont get stuck. I've converted a tool which records paths for you (found here: http://osbot.org/forum/topic/61609-path-generator-zwalker-portre-release/ ) Apa Also you declare the array to be 14 elements and then you try to put 16 elements in it?? 1 Quote Link to comment Share on other sites More sharing options...
syyfilis Posted April 8, 2015 Author Share Posted April 8, 2015 Thank you, seems like i read the api a little bit wrong and was wrong on the syntax side. Quote Link to comment Share on other sites More sharing options...