nav_generate doesn't work

Discussion in 'Mapping Questions & Discussion' started by Seitan, May 24, 2017.

  1. Seitan

    Seitan L3: Member

    Messages:
    136
    Positive Ratings:
    16
    I'm trying to make the halloween skeletons move around my map, so I generated a nav mesh but they won't move, this happens with normal bots too, the map even restarts when I build the mesh but when I connect again the bots are still not moving, what's happening?
     
  2. Nicky

    aa Nicky Lets try something new!

    Messages:
    912
    Positive Ratings:
    1,698
    What game mode is it? And is there entity logic for objectives? Bots don't work on some game modes and they don't move if you don't have anything like a control point in your map.
     
  3. Seitan

    Seitan L3: Member

    Messages:
    136
    Positive Ratings:
    16
    It's a CTF map
     
  4. Nicky

    aa Nicky Lets try something new!

    Messages:
    912
    Positive Ratings:
    1,698
    Do you have the entity logic for ctf in your map?
     
  5. Seitan

    Seitan L3: Member

    Messages:
    136
    Positive Ratings:
    16
    Yes, the CTF gamemode is fully functional on my map
     
  6. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    754
    Positive Ratings:
    512
    A couple tips:
    1. Is sv_cheats set to 1? nav_generate is a cheat command; it requires cheats to be enabled to work.
    2. Are there info_player_teamspawn points on your map? I think nav_generate only flood-fills out from spawn points, so it won't generate if there aren't any spawnpoints.
    3. Check to see if a navmesh is being made. Use nav_edit 1, and if you see a mesh of boxes appear on the ground, that's a navmesh. If you don't see these boxes, there's no navmesh. Make sure everywhere the skeletons can go is covered, including where they spawn (if they have their own spawn area separate from the playable space).
    4. If all else fails, cover your map in nav_mark_walkable marks spaced every 500-1000 HU. Once that's done, use nav_generate_incremental. This generates a mesh in the areas that you marked as walkable.
     
  7. Seitan

    Seitan L3: Member

    Messages:
    136
    Positive Ratings:
    16
    It actually looks like this:
    [​IMG]

    I added a lot of nav_mark_walkable and did the nav_generate_incremental thing but it doesn't work
     
  8. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    754
    Positive Ratings:
    512
    Those s̶q̶u̶a̶r̶e̶s rectangles are exactly what the navigation mesh looks like, which means (as long as the mesh is covering the skeleton spawn), the problem lies elsewhere.

    When you're testing the skeletons, is there at least 1 player (or bot) in the map in a place that the skeletons can reach (so not in their spawn)? Skeletons won't move unless they have a target that they can reach. If there are no players in the map for them to attack, they won't move.

    If the skeletons still won't move, try getting within melee range of them. Do they try to attack you, or do they stand idle?
     
    • Thanks Thanks x 1
  9. Seitan

    Seitan L3: Member

    Messages:
    136
    Positive Ratings:
    16

    I placed some mark_walkables and it worked, the normal bots don't move but the skeletons do and that's all what I need, thank you very much.