NPC.GetPathDistanceToGoal
From GMod Wiki
Revision as of 15:48, 9 January 2011 by Disseminate (Talk | contribs)
| Function | |
| Syntax | NPC:GetPathDistanceToGoal( ) |
| Description: | |
| Get how long the path of a moving NPC will be. | |
| Returns: | Number |
| In Object: | Npc |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=NPC.GetPathDistanceToGoal]NPC.GetPathDistanceToGoal [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Gets the distance of a path of a metrocop. |
|---|---|
| Used on | |
| Code | MsgN( ents.FindByClass( "npc_metropolice" )[1]:GetPathDistanceToGoal() ); |
| Output | Length. |
Additional Notes
- This differs from a straight on distance as it returns the actual path length instead of a linear distance.