ni562 Posted January 3, 2016 Posted January 3, 2016 So far my script is working great but theres a litle bug i can't seem to fix.... When the door to the STAIR_AREA is already open, it will click a door that is near the stairs but not at all in my path.. Is there a way to check if the nearest door is already open and skip this bit ? if (doorHandler.handleNextObstacle(STAIR_AREA)) { walker.walk(STAIR_AREA.getRandomPosition(), true); }
Explv Posted January 3, 2016 Posted January 3, 2016 So far my script is working great but theres a litle bug i can't seem to fix.... When the door to the STAIR_AREA is already open, it will click a door that is near the stairs but not at all in my path.. Is there a way to check if the nearest door is already open and skip this bit ? if (doorHandler.handleNextObstacle(STAIR_AREA)) { walker.walk(STAIR_AREA.getRandomPosition(), true); } if(getMap().canReach(STAIR_AREA.getRandomPosition())){ walker.walk(STAIR_AREA.getRandomPosition(), true); } else{ doorHandler.handleNextObstacle(STAIR_AREA)); }
ni562 Posted January 3, 2016 Author Posted January 3, 2016 if(getMap().canReach(STAIR_AREA.getRandomPosition())){ walker.walk(STAIR_AREA.getRandomPosition(), true); } else{ doorHandler.handleNextObstacle(STAIR_AREA)); } Why dont i think of these things lol Thanks Explv