1. Post #1
    foxcock
    Bletotum's Avatar
    June 2008
    6,873 Posts
    Just because someone asked me to release the code I used to test the core of this in a video.

    :siren: This requires the gm_navigation module! Read below for more information. :siren:
    :siren: This is not meant for multiplayer! Your npcs would probably just stumble around and cry. :siren:

    [release]About.
    This tool is for telling an npc to move from point A to B. Only unlike other tools, npcs do not walk directly to point B and hit their face into a wall, they actually move around it. This is more useful in un-noded maps.They don't know about props, so they won't navigate your prop maze or anything like that.[/release]
    [release]Usage.
    Left click on a point somewhere to set the start, right click to set the end. Reload on an npc to make it begin.
    Make sure the npc is near the start position, it will walk directly to that one, to really start, and then follow the path the navigation module created.[/release]
    [release]Other.
    IF YOU ARE ON A MAP FOR THE FIRST TIME USING THIS TOOL, TYPE NPCMOVER_NODEMAP INTO THE CONSOLE. This will tell the module to create it's own node path to use. Depending on the map's size and your computer, this could take from ten seconds to five minutes. But after that the map's node file is saved into data/mapname.txt, and you never have to do it again for that map. The node path is created based on your current position when you use the command, so stand in the general area that you'll usually be making npcs move around in.
    Sometimes (actually quite often) the node path that is created will not work in some areas, like up some stairs or ramps. This will cut off areas from the map from being noded. This addon uses a VERY basic method of creating a node file with the module! If you had a node file that was perfect for your map, this tool would work perfectly too. I will try to make some nodes for a few maps to distribute, or a visual editor for nodes, but don't hold your breath on that. If you do get a fantastic noding of your map, just rename the file to mapname.txt, and put it into the data folder.

    Don't try to node flatgrass, it will take you a very very long time.

    Gm_Navigation module, excellent module by Spacetech. Put the .dll of the windows release into gmod/lua/includes/modules.

    Special thanks to Spacetech for helping me out with silly errors.[/release]

    Anyways, media.


    Reply With Quote Edit / Delete Reply United States Show Events Useful Useful x 2Optimistic Optimistic x 1 (list)

  2. Post #2
    King of the Oil Refinery
    Tobba's Avatar
    December 2008
    6,222 Posts
    Nice usage of gm_navigation

  3. Post #3
    Gold Member
    Stud Muffin's Avatar
    April 2008
    1,038 Posts
    For some reason I was already subscribed to you...

  4. Post #4
    foxcock
    Bletotum's Avatar
    June 2008
    6,873 Posts
    For anyone that cares, I'm almost done with a newer version of my transition tool. It'll actually work like it should, with a bunch of other good features. It'd already be out, but I need a way to subtract bone matrix's.

  5. Post #5
    Gold Member

    April 2009
    726 Posts
    Nice, have been waiting for this :)

  6. Post #6
    Gold Member
    FluD's Avatar
    February 2006
    1,147 Posts
    this can make striker walk and gunship fly ?

  7. Post #7
    foxcock
    Bletotum's Avatar
    June 2008
    6,873 Posts
    I've not tried it on a strider but I bet it's too big. Flying things too since they hover around. They'd just go to the start position and not move any further since the game thinks the closest node made by the module isn't the one it's on.

  8. Post #8
    Flubascrub
    Flubadoo's Avatar
    August 2009
    10,532 Posts
    This is fucking beast! But make it so that you can place more than just one waypoint. So it'll keep going.

  9. Post #9
    Gold Member
    Keggs's Avatar
    June 2010
    347 Posts
    Awesome

  10. Post #10
    Flubascrub
    Flubadoo's Avatar
    August 2009
    10,532 Posts
    Do they shoot when walking?

  11. Post #11
    foxcock
    Bletotum's Avatar
    June 2008
    6,873 Posts
    They're only being told to walk, not shoot. This is only released as an example for the navigation module really.

    This is fucking beast! But make it so that you can place more than just one waypoint. So it'll keep going.
    If you have a fully working navigation table made by the module, this will work perfectly. This is supposed to make an npc walk from ANY point on the map to any other that is accessible.

  12. Post #12
    snackrib's Avatar
    April 2005
    31 Posts
    I call animal cruelty on that!!
    Reply With Quote Edit / Delete Reply Sweden Show Events Funny Funny x 1 (list)

  13. Post #13
    Flubascrub
    Flubadoo's Avatar
    August 2009
    10,532 Posts
    They're only being told to walk, not shoot. This is only released as an example for the navigation module really.



    If you have a fully working navigation table made by the module, this will work perfectly. This is supposed to make an npc walk from ANY point on the map to any other that is accessible.
    If there is a ditch separating them and the place you tell them to go to, will they fall in and climb up?

  14. Post #14
    foxcock
    Bletotum's Avatar
    June 2008
    6,873 Posts
    This isn't magic, they only go where an npc could normally chase you on a noded map. Except this tells them where to go, and can be done on non valve style noded maps.

    Added multiplayer warning to OP.