# AI Pathing Cost Map
Grammar — Pathing cost from point from to point to
Flags —Native
|Function
Returns the map pathing cost between two points, ignores all units.
# Arguments
point
— Frompoint
— To
Returns — int
native int AIPathingCostMap(point from, point to);
# Related
Category: AI Advanced / Utility / Functions
- [F] —
bool
— Is Point In Shrub — ( InShrub ) - [F] —
bool
— Is Campaign AI — ( AIIsCampaign ) - [F] —
unit
— Grab Unit — ( AIGrabUnit ) - [F] —
int
— Get State — ( AIState ) - [F] —
bool
— Get Flag — ( AIGetFlag ) - [F] —
bool
— Get Coop Flag — ( AIGetCoopFlag ) - [F] —
bool
— Unit Has AI Option — ( UnitGetAIOption ) - [F] —
bool
— Wants To Surrender — ( AIGivingUp ) - [F] —
int
— AI Pathing Cost Map — ( AIPathingCostMap ) - [F] —
int
— AI Pathing Cost Unit — ( AIPathingCostUnit ) - [F] —
point
— AI Self Reinforce Point — ( AISelfReinforceDropPoint )
# Examples
# mods/heroes.stormmod
// L5869
AIPathingCostMap(UnitGetPosition(libStEx_gv_hERO_PlayerUnit), lv_originalLoc)
// L5869
AIPathingCostMap(UnitGetPosition(libStEx_gv_hERO_PlayerUnit), lv_originalLoc)
# mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod
// L519
AIPathingCostMap(UnitGetPosition(libGame_gv_players[autoA0480C1D_var].lv_heroUnit), libLNYF_gv_leaderboard.lv_point[lv_index_FurthestOccupiedRegion])
// L520
AIPathingCostMap(UnitGetPosition(libGame_gv_players[autoA0480C1D_var].lv_heroUnit), libLNYF_gv_leaderboard.lv_point[lv_index_FurthestOccupiedRegion])
# mods/starcoop/starcoop.sc2mod
// L4234
AIPathingCostMap(lv_riftLocation, PlayerStartLocation(lp_forPlayer))
// L5707
AIPathingCostMap(UnitGetPosition(UnitGroupUnit(UnitGroupSelected(EventPlayer()), 1)), PlayerStartLocation(1))
// L5708
AIPathingCostMap(UnitGetPosition(UnitGroupUnit(UnitGroupSelected(EventPlayer()), 1)), PlayerStartLocation(2))
// L5712
AIPathingCostMap(CameraGetTarget(EventPlayer()), PlayerStartLocation(1))
// L5713
AIPathingCostMap(CameraGetTarget(EventPlayer()), PlayerStartLocation(2))