Butters Posted January 10, 2018 Author Share Posted January 10, 2018 11 minutes ago, Explv said: https://www.google.com/search?q=shortest+path+algorithm+java https://www.google.com/search?q=shortest+path+algorithm+java https://www.google.com/search?q=shortest+path+algorithm+java Create a "graph" connecting rooms to each each other. Each node on the graph is a room, each link is an obstacle e.g. a Gate When you want to walk from room A to room B, find the shortest path in your graph from room A to room B, then traverse the path. Really didn't want to resolve to this, but Thanks! Will be fun to mess around it with it. Gonna try Dijkstra Quote Link to comment Share on other sites More sharing options...
Chase Posted January 10, 2018 Share Posted January 10, 2018 6 minutes ago, Explv said: Well it would change something. lever would then be null, seeing as the player cannot reach it??? I'm not sure you understand the original question. He wants to know how to navigate Draynor Manor Basement without web walking (as web walking does not support it) Ah i understand, didn't recognize he was looking with specific lever name. I thought he was just looking for the closest lever, and I figured the closest one wouldn't always be the one reachable. Quote Link to comment Share on other sites More sharing options...
Explv Posted January 10, 2018 Share Posted January 10, 2018 9 minutes ago, nosepicker said: Really didn't want to resolve to this, but Thanks! Will be fun to mess around it with it. Gonna try Dijkstra Breadth first search would probably be better, I don't think you really need to use weighted edges in this instance. Quote Link to comment Share on other sites More sharing options...
Juggles Posted January 10, 2018 Share Posted January 10, 2018 Shit coder method would be to code by areas and check if in an area and then code which doors to click. 1 Quote Link to comment Share on other sites More sharing options...
Butters Posted January 10, 2018 Author Share Posted January 10, 2018 14 minutes ago, Juggles said: Shit coder method would be to code by areas and check if in an area and then code which doors to click. Lol thought about that and actually have all the info needed to do this, but too ugly Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted January 10, 2018 Share Posted January 10, 2018 Couldn't you do something like: if (QuestConfig){ if (levelName.isReachable()){ //interact w/ lever } else { //generate path to lever if (obstacleInPath){ handleObstacle } else walkThePath } } Could try using LocalPathFinder to generate the path Quote Link to comment Share on other sites More sharing options...
Explv Posted January 10, 2018 Share Posted January 10, 2018 (edited) 4 minutes ago, HeyImJamie said: Couldn't you do something like: if (QuestConfig){ if (levelName.isReachable()){ //interact w/ lever } else { //generate path to lever if (obstacleInPath){ handleObstacle } else walkThePath } } Could try using LocalPathFinder to generate the path Don't think LocalPathFinder accounts for Doors? Think it only generates paths to reachable positions. Might be wrong though Edited January 10, 2018 by Explv Quote Link to comment Share on other sites More sharing options...
TheWind Posted January 10, 2018 Share Posted January 10, 2018 I haven't done that quest in a while without Token's Quester. Do the doors have the option "Open" even if they can't be opened? (the levers aren't in the correct positions for it to open) Quote Link to comment Share on other sites More sharing options...
Butters Posted January 10, 2018 Author Share Posted January 10, 2018 24 minutes ago, TheWind said: I haven't done that quest in a while without Token's Quester. Do the doors have the option "Open" even if they can't be opened? (the levers aren't in the correct positions for it to open) The doors don't have the option if they can't be opened Quote Link to comment Share on other sites More sharing options...
Alek Posted January 12, 2018 Share Posted January 12, 2018 On 1/10/2018 at 10:11 AM, Juggles said: Shit coder method would be to code by areas and check if in an area and then code which doors to click. Considering its a specific niche puzzle, this would be the way to solve it. I was under the impression that this was for general application, not specifically for just the Draynor Mansion basement. Quote Link to comment Share on other sites More sharing options...
Butters Posted January 12, 2018 Author Share Posted January 12, 2018 1 minute ago, Alek said: Considering its a specific niche puzzle, this would be the way to solve it. I was under the impression that this was for general application, not specifically for just the Draynor Mansion basement. The original question was about general application. 10 minutes ago, El_Maestro said: Have you considered standing the in the middle of the room and just monitoring all the objects to get the puzzles state? For example: I know lever D down opens door and A. I check if its down, if it is then door A is a viable route. Do the same for the rest. From there generating a path shouldn't be hard on your own. You can "know" the route by checking configs. Each pulled lever changes a config value so you can hardcode the path you want depending on the value. General idea was to make it universal regarding other areas that might need similar functionality. Quote Link to comment Share on other sites More sharing options...