Jump to content
syyfilis

localwalker.walkPath stops in the middle.

Recommended Posts

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing   0 members

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