Hey!
Not so sure what you mean. Do you mean, like my rock crabs script, that you want there to be a 'random' option where the script would walk to either west or east rock crabs based on a random returned boolean or similar?
If so, it's not that simple. But ultimately, you need to record two different paths going from the bank, eg BANK_TO_NORTH, BANK_TO_SOUTH
then, when the code comes up to walk to the area, just do
switch(random(1,2)) {
case 1:
localWalker.walkPath(BANK_TO_NORTH);
//any additional code here
break;
case 2:
localWalker.walkPath(BANK_TO_NORTH);
//any additional code here
break;
}
Or something similar. Remember, that will only start walking. You need do find some method of telling the script to continue walking that path if for whatever reason it stops. A good but somewhat looked down on method for doing this is usng flags. There's no real problem with doing this so i suggest you do
So you would just put a boolean set to true after you call the walkPath method, and then just in your getState ask if that same boolean is true, if so walk north, otherwise walk south etc. remember to reset the boolean when you get to the desired area though!
Let me know if i'm talking about the wrong thing or you have any other problems.
Apaec