Path corner: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
There are two ways to forcibly move AI: through path_corner entities or choreography. Choreography goes beyond the scope of this document and will be ignored. We shall instead focus on path_corners, which are simple: make one, name it, then shift+drag it to create the next path_corner in the chain.  
A path_corner is a destination for an NPC. When told to, NPCs will stop other movement and walk steadily towards a path_corner. It is entirely scripted behaviour.


To manually make a chain (or link one up in a circle), edit the 'Next stop target' property. Note that the 'Train Speed' values are obsolete unless you are making a path for a func_train.
Path_corners can be chained together to form more complex routes. To create a path_corner chain simply shift+drag an existing path_corner. The values will automatically by filled in. To manually make a chain (or link one up in a circle), edit the '''Next stop target''' property. Note that the '''Train Speed''' values are obsolete unless you are making a path for a func_train.


Once you have the path laid out, go to your AI entity and set 'Target Path Corner' to the path_corner you want it to enter at.
To make an NPC move to a path_corner edit the 'Target Path Corner' keyvalue, either in Hammer or through the I/O system.


==Limitations and bugs==
* A path_corner (or the first path corner on a chain) must be within 576 units for NPCs to find it.
==Example==
[http://www.btinternet.com/~varsity_uk/VDC/Source_AI/apc_drive.zip Example map (VMF)]
[http://www.btinternet.com/~varsity_uk/VDC/Source_AI/apc_drive.zip Example map (VMF)]


Note that the example map does not have any info_nodes. They are not needed to have AI follow a path.
Note that the example map does not have any [[info_node|info_nodes]]. They are not needed to have an NPC follow a path.


[[Category:AI]]
[[Category:AI]]
[[Category:Entities]]
[[Category:Entities]]

Revision as of 09:24, 2 July 2005

A path_corner is a destination for an NPC. When told to, NPCs will stop other movement and walk steadily towards a path_corner. It is entirely scripted behaviour.

Path_corners can be chained together to form more complex routes. To create a path_corner chain simply shift+drag an existing path_corner. The values will automatically by filled in. To manually make a chain (or link one up in a circle), edit the Next stop target property. Note that the Train Speed values are obsolete unless you are making a path for a func_train.

To make an NPC move to a path_corner edit the 'Target Path Corner' keyvalue, either in Hammer or through the I/O system.

Limitations and bugs

  • A path_corner (or the first path corner on a chain) must be within 576 units for NPCs to find it.

Example

Example map (VMF)

Note that the example map does not have any info_nodes. They are not needed to have an NPC follow a path.