# Pathing Cost Between Points

Grammar — Pathing cost between p1|Point and p2|Point
FlagsNative | Function

Returns the ground pathing cost between two points as an integer.

# Arguments

  • point — Point 1
  • point — Point 2

Returns — int

native int PointPathingCost(point p1, point p2);

Category: Point / Pathing

# Examples

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L513
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveTo)
// L516
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L516
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L528
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L532
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L804
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveTo)
// L807
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L807
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L819
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L823
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L507
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveTo)
// L510
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L510
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L522
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L526
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L513
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveTo)
// L516
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L516
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L528
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L532
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L804
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveTo)
// L807
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L807
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L819
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L823
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L507
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveTo)
// L510
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L510
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)
// L522
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToA)
// L526
PointPathingCost(UnitGetPosition(lp_diamondback), lv_moveToB)

# campaigns/swarmstory.sc2campaign

SwarmCampaignDataHelperLib.galaxy

// L98
PointPathingCost(lv_k, lv_t)

# campaigns/voidstory.sc2campaign

VoidCampaignMissionLib.galaxy

// L5657
PointPathingCost(lv_k, lv_t)
// L5741
PointPathingCost(lv_k, lv_t)
// L5825
PointPathingCost(lv_k, lv_t)

# mods/heroesdata.stormmod

GameDataHelperLib.galaxy

// L8670
PointPathingCost(UnitGetPosition(autoC170BB9F_var), lv_actualTargetPoint)

# mods/missionpacks/novacampaign.sc2mod

LibNCMI.galaxy

// L4715
PointPathingCost(lv_k, lv_t)

# mods/novastoryassets.sc2mod

MapScript.galaxy

// L4428
PointPathingCost(UnitGetPosition(UnitGroupLoopCurrent()), UnitGroupCenterOfGroup(lv_waveGroup))
// L7585
PointPathingCost(UnitGetPosition(gv_stone), UnitGetPosition(lv_closestEnemyTargetUnit))
// L7595
PointPathingCost(PointFromName((lv_movePointString + IntToString(lv_movePointIter))), UnitGetPosition(lv_closestEnemyTargetUnit))
// L7595
PointPathingCost(PointFromName((lv_movePointString + IntToString(lv_movePointIter))), UnitGetPosition(lv_closestEnemyTargetUnit))
// L7595
PointPathingCost(lv_movePoint, UnitGetPosition(lv_closestEnemyTargetUnit))
// L4428
PointPathingCost(UnitGetPosition(UnitGroupLoopCurrent()), UnitGroupCenterOfGroup(lv_waveGroup))
// L7585
PointPathingCost(UnitGetPosition(gv_stone), UnitGetPosition(lv_closestEnemyTargetUnit))
// L7595
PointPathingCost(PointFromName((lv_movePointString + IntToString(lv_movePointIter))), UnitGetPosition(lv_closestEnemyTargetUnit))
// L7595
PointPathingCost(PointFromName((lv_movePointString + IntToString(lv_movePointIter))), UnitGetPosition(lv_closestEnemyTargetUnit))
// L7595
PointPathingCost(lv_movePoint, UnitGetPosition(lv_closestEnemyTargetUnit))

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L6692
PointPathingCost(PlayerStartLocation(libCOMI_gv_cM_ZeratulPlayer), lv_pointIter)
// L6781
PointPathingCost(lv_pathingCheckPoint, lv_pointIter)
// L6877
PointPathingCost(lv_pathingCheckPoint, lv_pointIter)
// L20907
PointPathingCost(lv_k, lv_t)
// L23268
PointPathingCost(lv_k, lv_t)

# mods/warcoop/progression/equipments.sc2mod

LibPEqu.galaxy

// L193
PointPathingCost(lv_placementPoint, UnitGetPosition(lv_hero))