# Lane Waypoint Calc Closest Data For Lane

FlagsNative | Action

Calculates a handful of data for the closest point in the given TestLane to point TestPoint. Query the calculated data with the “Lane Waypoint Get Calc Data ___” functions.

# Arguments

  • int — TestLane
  • point — TestPoint

Returns — void

native void AILaneWaypointCalcClosestDataForLane(
	int testLane,
	point testPoint,
);

Category: AI Advanced / Lane / Actions

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:8190


    // Implementation
    AILaneWaypointCalcClosestDataForLane(lp_curLane, lp_testPoint);
    libGame_gv_closestLaneData.lv_laneData[lp_curLane].lv_closestIndex = AILaneWaypointGetCalcDataClosestWaypointIndex();
    libGame_gv_closestLaneData.lv_laneData[lp_curLane].lv_secondaryIndex = AILaneWaypointGetCalcDataSecondWaypointIndex();