LoudPacks Posted January 24, 2016 Share Posted January 24, 2016 Alright so basically I have each of the mining areas in the motherlode mined defined. I want to be able to walk to one of these areas and handle the rockfall obstacles that are in the way. Right now if a rockfall is present, a path is not able to be generated. If the rockfall is already mined, the path works fine. Im trying to figure out a way to "ignore" obstacles and generate a path so that I can handle the rockfalls myself (when it gets stuck infront of it using the path). Is there a different approach to doing this? Quote Link to comment Share on other sites More sharing options...
Extreme Scripts Posted January 24, 2016 Share Posted January 24, 2016 Use clipping tiles. Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted January 24, 2016 Share Posted January 24, 2016 (edited) Use AStar* to make your own localwalker Then use the flags of the tiles to navigate through the mine ^^ Edited January 24, 2016 by Khaleesi Quote Link to comment Share on other sites More sharing options...
LoudPacks Posted January 24, 2016 Author Share Posted January 24, 2016 Use AStar* to make your own localwalker Then use the flags of the tiles to navigate through the mine ^^ Can u explain the second part in a little more detail? Do you mean save all tiles where rocks spawn? Quote Link to comment Share on other sites More sharing options...
Precise Posted January 24, 2016 Share Posted January 24, 2016 (edited) Can u explain the second part in a little more detail? Do you mean save all tiles where rocks spawn? clipping data mate, have a browse on the forums, you will find some helpful things ^^ Edited January 24, 2016 by Precise Quote Link to comment Share on other sites More sharing options...
FrostBug Posted January 24, 2016 Share Posted January 24, 2016 (edited) The LocalPathfinder has an overload that takes a clipping graph for path generation. Just get the current clipping graph and set the rock positions to be traversible, and use that with the pathfinder. Then add whatever handling you want. OR do as the others said and make your own pathfinder. Edited January 24, 2016 by FrostBug Quote Link to comment Share on other sites More sharing options...
LoudPacks Posted January 24, 2016 Author Share Posted January 24, 2016 The LocalPathfinder has an overload that takes a clipping graph for path generation. Just get the current clipping graph and set the rock positions to be traversible, and use that with the pathfinder. Then add whatever handling you want. OR do as the others said and make your own pathfinder. Okay so I came up with this. Now it will try and walk. How do I go about handling the rockfall when its in front of the player? if(!inZone()){ LocalPathFinder path = new LocalPathFinder(getBot()); LinkedList<Position> generatedPath = path.findPath(getRandomZone().zone.getRandomPosition(), generateModifiedClippingData()); getLocalWalker().walking.walkPath(generatedPath); } In getting the clipping data I also get a List<RS2Object> of all the rockfalls. Should I just iterate through that list and "mine" the closest one? Is there a better way of doing this? Quote Link to comment Share on other sites More sharing options...
FrostBug Posted January 24, 2016 Share Posted January 24, 2016 (edited) Okay so I came up with this. Now it will try and walk. How do I go about handling the rockfall when its in front of the player? if(!inZone()){ LocalPathFinder path = new LocalPathFinder(getBot()); LinkedList<Position> generatedPath = path.findPath(getRandomZone().zone.getRandomPosition(), generateModifiedClippingData()); getLocalWalker().walking.walkPath(generatedPath); } In getting the clipping data I also get a List<RS2Object> of all the rockfalls. Should I just iterate through that list and "mine" the closest one? Is there a better way of doing this? Get the rockfalls located on the generated path. With this you can walk to the tile in front of the next rockfall, mine it, continue. Edited January 24, 2016 by FrostBug Quote Link to comment Share on other sites More sharing options...