January 24, 201610 yr 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?
January 24, 201610 yr Use AStar* to make your own localwalker Then use the flags of the tiles to navigate through the mine ^^ Edited January 24, 201610 yr by Khaleesi
January 24, 201610 yr Author 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?
January 24, 201610 yr 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, 201610 yr by Precise
January 24, 201610 yr 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, 201610 yr by FrostBug
January 24, 201610 yr Author 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?
January 24, 201610 yr 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, 201610 yr by FrostBug
Create an account or sign in to comment