GSC reference › Built-in

FindPath()

Built-in (engine) Server

Check if a path can be found between these positions.

Signature

FindPath(<start>, <end>)

Parameters

NameRequired?Details
startRequired .
endRequired .

Example (from Treyarch's docs)

if ( self FindPath( self.origin, potentialpos ) )

Real uses in BO3's scripts

Called 36 times in the decompiled scripts. A few, zombies first:

Related built-ins

  • ConnectPaths()
    Connects the paths that intersect with the entity.
  • DisconnectPaths()
    Disconnects the paths that intersect with the entity.
  • PathMode()
    Set the path mode of this actor.
  • HasPath()
    Returns true/false if AI has a path
  • ClearPath()
    Clears the AI's current path.
  • AttachPath()
    Attaches this vehicle to the given path.
  • StartPath()
    Starts the vehicle following this path.
  • SetRepairPaths()
    True allows havok to repath automatically if the AI moves off their predefined path.
  • CalcApproximatePathToPosition()
    Returns an array of world positions representing the approximate path an actor will take.
  • PathDistance()
    Returns the approximate/semi-accurate path distance between two points or undefined if no path can be found.
  • DrivePath()
    Starts the vehicle driving this path and uses the vehicle physics, not locked to the spline, can only achieve turns that the physics can handle.
  • CanPath()
    Check if a path can be found between these positions.

New to GSC?

Start with the basics, or paste a compile error to get the fix.

Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).