GSC reference › Built-in

CalcApproximatePathToPosition()

Built-in (engine) Server AI Called on: actor

Returns an array of world positions representing the approximate path an actor will take. Calculating an approximate path will cause the AI to clear their current path.

Signature

<actor> CalcApproximatePathToPosition(<position>, [clear path])

Called on an entity: actor CalcApproximatePathToPosition(...)

Parameters

NameRequired?Details
positionRequired The goal position for the path
clear pathOptional True to clear path, false otherwise. Defaults to True

Returns

Returns an array of world positions representing the approximate path an actor will take.

Example (from Treyarch's docs)

self CalcApproximatePathToPosition( position )

Real uses in BO3's scripts

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

Related built-ins

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).