WebVertex help

Discussion in 'Developer Support' started by mjmfighter, Jul 18, 2015.

  1. I am trying to do some simple walking with the default web right now. I have read over the tutorials that cloud has posted about adding vertexs and stuff, but I am still a bit confused and my code does not seem to work right. I am simply trying to walk from Edgeville out into the wilderness. However to do so, there is the wall you have to jump over. This is the code I have so far:

    Code (Text):
    1. Coordinate wildernessWallPosition = new Coordinate(3103, 3522, 0);
    2.         BasicObjectVertex wildernessWall = new BasicObjectVertex(wildernessWallPosition, "Wilderness wall", "Cross");
    3.         Traversal.getDefaultWeb().addVertices(wildernessWall);
    However this doesn't work when I use the builder to get my path. It doesn't go anywhere close to the new object. I think I have to add a direct edge maybe, but I don't know how to go about doing that.

    Thanks for reading and helping
  2. There are two problems. One is that you're adding to the default web which is no longer supported. Functionality for that is being removed in the next release. The next problem is that you have to link your object vertex to another vertex that's in the web so that the path finding can connect them.
  3. Since the default web is not longer supported, what is supported... or should I say how do I go about walking now? Every tutorial and resource I have found uses it so its what I was basing mine off of. I see now that in the debug window it says that it is getting removed.

    Keeping with the default web, i tried adding:
    wildernessWall.addDirectedEdge(new CoordinateVertex(new Coordinate(3103, 3520, 0)));

    That coord is in the web, but it still does not work and tried to walk around the wall instead (which isnt possible)
  4. The default web can still be used, but it may not have any additions/subtractions made to it. If you want to do custom obstacles and such you must build a local web for the area. The reason that it's no longer supported is because path finding calculations have been moved (or rather are in the process of) being moved server-side. To expand on that, the web is also going to be being revamped soon to support more obstacles and teleports.

    Edit: Also, bidirectional is what you should be using. But you also need to add that coordinate vertex to the web and link it to something else in your web.
  5. Alright that makes sense. I got my walking to work for now. Thanks for the help Cloud!
    --- Double Post Merged, Jul 24, 2015, Original Post Date: Jul 18, 2015 ---
    So I am still having trouble with webs. I am trying to create my own web now just to better support the wilderness wall, but I can not get it to work. I used Alpha Web Extender to create a web on both sides of the wall and then saved it to a file. I then am using the following code to connect the two web portions together so the path builder can determine how to walk, but it is failing to create a path no matter where I stand (tried both sides of the wall in portions that should be part of the web). .

    Code (Text):
    1. Coordinate wildernessWallPosition = new Coordinate(3103, 3522, 0);
    2.         BasicObjectVertex wildernessWall = new BasicObjectVertex(wildernessWallPosition, "Wilderness wall", "Cross");
    3.         //Spots that are jumped to
    4.         CoordinateVertex v1 = new CoordinateVertex(new Coordinate(3103, 3520, 0)); //Side not in wildy
    5.         CoordinateVertex v2 = new CoordinateVertex(new Coordinate(3103, 3523, 0)); //Side in wildy
    6.         wildernessWall.addBidirectionalEdge(v1);
    7.         wildernessWall.addBidirectionalEdge(v2);
    8.         v1.addBidirectionalEdge(v1);
    9.         v2.addBidirectionalEdge(v2);
    10.         v1.addBidirectionalEdge(web.getVertexNearestTo(v1));
    11.         v2.addBidirectionalEdge(web.getVertexNearestTo(v2));
    12.         web.addVertices(v1, v2, wildernessWall);
    I have loaded the web after adding the addition above back into Alpha Web Extender and it shows the connections, but even if I am on the wildy side of the wall it does not generate a path to the abyss mage. I am really at a complete loss as to why it is always returning null when i try to generate a path.

Share This Page