# Unit Can Path To Unit

Grammarunit Can Path To target with range Range and maxDistance Maximum Distance
FlagsNative | Function

This returns whether or not the unit can path to the specified unit.

# Arguments

  • unit — Source Unit
  • unit — Target
  • fixed — Range
  • fixed — Max Distance

Returns — bool

native bool UnitPathableToUnit(
	unit u,
	unit inTarget,
	fixed inRange,
	fixed inMaxDistance,
);

Category: Unit / Basic

# Examples

# campaigns/void.sc2campaign

MapScript.galaxy

// L1090
UnitPathableToUnit(lp_construct, gv_aRTANIS, 0.0, 1000.0)
// L1094
UnitPathableToUnit(lp_construct, gv_kERRIGAN, 0.0, 1000.0)
// L1141
UnitPathableToUnit(lp_crystal, gv_aRTANIS, 0.0, 1000.0)
// L1145
UnitPathableToUnit(lp_crystal, gv_kERRIGAN, 0.0, 1000.0)
// L1268
UnitPathableToUnit(lp_enemyUnit, gv_kERRIGAN, 0.0, 1000.0)
// L1274
UnitPathableToUnit(lp_enemyUnit, gv_aRTANIS, 0.0, 1000.0)
// L1090
UnitPathableToUnit(lp_construct, gv_aRTANIS, 0.0, 1000.0)
// L1094
UnitPathableToUnit(lp_construct, gv_kERRIGAN, 0.0, 1000.0)
// L1141
UnitPathableToUnit(lp_crystal, gv_aRTANIS, 0.0, 1000.0)
// L1145
UnitPathableToUnit(lp_crystal, gv_kERRIGAN, 0.0, 1000.0)
// L1268
UnitPathableToUnit(lp_enemyUnit, gv_kERRIGAN, 0.0, 1000.0)
// L1274
UnitPathableToUnit(lp_enemyUnit, gv_aRTANIS, 0.0, 1000.0)

# mods/heroesdata.stormmod

GameDataHelperLib.galaxy

// L19917
UnitPathableToUnit(lv_misha, lv_rexxar, 0.0, 0.0)
// L19923
UnitPathableToUnit(lv_misha, lv_rexxar, 0.0, 0.0)

# mods/novastoryassets.sc2mod

MapScript.galaxy

// L982
UnitPathableToUnit(lp_sporeCrawler, UnitGroupLoopCurrent(), 0.0, 0.0)
// L991
UnitPathableToUnit(lp_sporeCrawler, UnitGroupLoopCurrent(), 0.0, 0.0)
// L982
UnitPathableToUnit(lp_sporeCrawler, UnitGroupLoopCurrent(), 0.0, 0.0)
// L991
UnitPathableToUnit(lp_sporeCrawler, UnitGroupLoopCurrent(), 0.0, 0.0)