Ai show connect: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 13: Line 13:




==Notes==


The color of the lines between the nodes will identify the type or state of the connection between the nodes. The colors are as follows:
* ** A connection that an NPC recently marked invalid because it was unable to move between the nodes. Once marked, connections stay invalid for at least 4 seconds to prevent multiple NPCs trying to navigate over a dynamically blocked connection.


==Usage==
==Usage==

Revision as of 00:29, 16 July 2005

Template:Wrongtitle

The ai_show_connect console command is a debugging tool for examining the AI node graph. The quality of the node graph has a large impact on the perceived quality of the AI, so it's important to be able to identify and solve node graph problems.

When debugging node graph problems, first determine the hull size used by the NPC that's having problems navigating. Each NPC tells the AI system the size of its NPC Hull. A small headcrab will be able to get into spaces that the much larger Antlion Guard can't, so the AI system calculates potential connections between nodes for each registered hull.

The easiest way to fix node graph problems is to use the map_edit command, which allows you to interactively modify the node graph in-engine.


Example

The node graph in HL2's d1_town_01.bsp

An example of ai_show_connect in action. The currently selected hull is shown in the bottom right corner. In this case, the hull is HUMAN_HULL, which is used by all humanoid sized enemies (Combine Soldiers, Metropolice, Citizens, Alyx, etc).



Usage

  • ai_show_connect
    • Toggle displaying ground node connections.
  • ai_show_connect_jump
    • Toggle display of jump connections between nodes.
  • ai_show_connect_fly
    • Toggle display of fly connections between nodes.
  • ai_next_hull
  • ai_nodes
    • Display all nodes. Useful for spotting nodes without any connections to them. Entering the command twice will also display the Hammer ID of the node.