Dorkinator 64 Posted July 23, 2017 The web nodes for McGrubbors wood aren't working. The client tries to use the South gate which will never work. It also wont path inside even though it does appear to be webbed.
Pandemic 2853 Posted July 23, 2017 Is there any way to get in there now that our local finder supports?
Dorkinator 64 Author Posted July 23, 2017 Is there any way to get in there now that our local finder supports?If I path to an area inside it walks to the south gate and gets stuck, even if I start next to the north entrance. I'm sure there's a way but the documentation for the web code is MIA and not very self explanatory, there's not any good examples as far as I can tell.
Pandemic 2853 Posted July 23, 2017 You should be able to add your own obstacle (object name + action) through the local walker, I'm sure there's a snippet around here somewhere. This looks right: getWalking().getAStarPathFinder().addObstacle(new PassableObstacle("Object Name", "Action", null, null, null)); Call that in onStart and it *should* work
Dorkinator 64 Author Posted July 23, 2017 You should be able to add your own obstacle (object name + action) through the local walker, I'm sure there's a snippet around here somewhere. This looks right: getWalking().getAStarPathFinder().addObstacle(new PassableObstacle("Object Name", "Action", null, null, null)); Call that in onStart and it *should* work new PassableObstacle("Loose Railing", "Squeeze-through", new Tile(2661, 3500, 0), new Tile(2662, 3500, 0), new Tile(2662, 3500, 0))That will fix it if you want to add it to the API. For future people wondering how to do this here you go. public class SuplementaryWeb { public SuplementaryWeb(Walking wf){ AbstractWebNode webNode0 = new BasicWebNode(2757, 3477); AbstractWebNode webNode1 = new BasicWebNode(2765, 3476); AbstractWebNode webNode2 = new BasicWebNode(2773, 3476); AbstractWebNode webNode3 = new BasicWebNode(2784, 3478); AbstractWebNode webNode4 = new BasicWebNode(2793, 3473); AbstractWebNode webNode5 = new BasicWebNode(2802, 3477); AbstractWebNode webNode6 = new BasicWebNode(2806, 3481); AbstractWebNode webNode7 = new BasicWebNode(2813, 3482); AbstractWebNode webNode8 = new BasicWebNode(2816, 3487); AbstractWebNode webNode9 = new BasicWebNode(2820, 3487); webNode1.addConnections(webNode0); webNode2.addConnections(webNode1); webNode3.addConnections(webNode2); webNode4.addConnections(webNode3); webNode5.addConnections(webNode4); webNode6.addConnections(webNode5); webNode7.addConnections(webNode6); webNode8.addConnections(webNode7); webNode9.addConnections(webNode8); AbstractWebNode[] nodes = {webNode0, webNode1, webNode2, webNode3, webNode4, webNode5, webNode6, webNode7, webNode8, webNode9, }; for(AbstractWebNode i:nodes){ wf.getWebPathFinder(); } PathObstacle[] obstacles = { new PassableObstacle("Loose Railing", "Squeeze-through", new Tile(2661, 3500, 0), new Tile(2662, 3500, 0), new Tile(2662, 3500, 0)) }; for(PathObstacle i:obstacles){ wf.getAStarPathFinder().addObstacle(i); } } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.