ni562 Posted January 3, 2016 Share 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); } Quote Link to comment Share on other sites More sharing options...
Explv Posted January 3, 2016 Share 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)); } Quote Link to comment Share on other sites More sharing options...
ni562 Posted January 3, 2016 Author Share 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 Quote Link to comment Share on other sites More sharing options...