Jump to content

localwalker.walkPath stops in the middle.


Recommended Posts

Posted
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();
 
}

 

Posted

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

Posted

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??

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...