Garry's Mod Wiki

CNavArea:GetCostSoFar

  number CNavArea:GetCostSoFar()

Description

Returns the cost from starting area this area when pathfinding. Set by CNavArea:SetCostSoFar.

Used in pathfinding via the A* algorithm.

More information can be found on the Simple Pathfinding page.

Returns

1 number
The cost so far.