# Lane Waypoint Get Closest Lane
Flags —
Native
|Function
Finds the lane closest to TestPoint (note this function can be called any time and is not dependent on “Lane Waypoint Calc Closest Data For Lane”).
# Arguments
point
— TestPoint
Returns — int
native int AILaneWaypointGetClosestLane(point testPoint);
# Related
Category: AI Advanced / Lane / Functions
- [F] —
int
— Lane Waypoint Get Closest Lane — ( AILaneWaypointGetClosestLane ) - [F] —
int
— Lane Waypoint Get Calc Data Closest Waypoint Index — ( AILaneWaypointGetCalcDataClosestWaypointIndex ) - [F] —
int
— Lane Waypoint Get Calc Data Second Waypoint Index — ( AILaneWaypointGetCalcDataSecondWaypointIndex ) - [F] —
point
— Lane Waypoint Get Calc Data Closest Point — ( AILaneWaypointGetCalcDataClosestPoint ) - [F] —
fixed
— Lane Waypoint Get Calc Data Closest Dist — ( AILaneWaypointGetCalcDataClosestDist )
# Examples
# mods/heroes.stormmod
// L6808
AILaneWaypointGetClosestLane(UnitGetPosition(libStEx_gv_hERO_EnemyFalstad))
// L6808
AILaneWaypointGetClosestLane(UnitGetPosition(libStEx_gv_hERO_EnemyFalstad))
# mods/heroesdata.stormmod
// L19027
AILaneWaypointGetClosestLane(UnitGetPosition(lv_dyingStructureUnit))
# mods/heroesmapmods/battlegroundmapmods/infernalshrines.stormmod
// L642
AILaneWaypointGetClosestLane(UnitGetPosition(lv_monster))
# mods/heromods/thefirelords.stormmod
// L595
AILaneWaypointGetClosestLane(lv_targetPoint)