Npc route

From Valve Developer Community
Revision as of 22:29, 11 July 2005 by Robin Walker (talk | contribs) (Created.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Wrongtitle

The npc_route console command is a debugging tool for debugging the route that an NPC is choosing when navigating to a point. A route consists of a set of waypoints. Each waypoint is an info_node entity placed by the level designer, or a dynamically generated point used to triangulate around an obstacle.


Example

An npc_zombie's route in HL2's d1_town_01.bsp

An example of npc_route in action. The npc_zombie is attempting to move from the right of the screen to the left (he is operating under the instruction of the npc_go command). The waypoints are represented by small squares, and the lines between the waypoints shows the route. Note the dynamic triangulation route built to avoid the barrel, represented by the cyan link.


Notes

The color of the route lines represent the type of route built from each waypoint to the next. The colors are as follows:

  • Blue
    • Standard path to the next waypoint.
  • Cyan
    • The path to a triangulation waypoint. These are dynamically generated by NPCs when they detect objects in their path, in an attempt to navigate around the obstacle.
  • Red
    • The movement to the next waypoint will be a jump.
  • Maroon
    • The final path to the destination point.


Usage

  • npc_route
    • This will toggle route-displaying for the NPC under your crosshair, if any.
  • npc_route <entity index>
    • This will toggle route-displaying for the NPC matching the specified entity index, if any.
  • npc_route <name>
    • This will toggle route-displaying for all NPCs whose classname matches the specified name, or whose targetname matches the specified name.


See also