Description
A* search algorithm. Uses hard-coded Manhattan distance to measure distance.
Note
This content is exclusive to the Arma 3 Contact Expansion.
Syntax
syntax inferred from the function header
[param0, param1, param2] call BIN_fnc_findPath
Parameters:
param0— 0: ARRAY of ARRAYs in format: 0: NUMBER - node cost 1: ARRAY - array of neighbor indexes 2: ARRAY - XYZ position of the node, used to measure distance from end posparam1— 1: NUMBER - index of starting pointparam2— 2: NUMBER - index of ending point
Returns: ARRAY of NUMBERs - indexes of nodes which are traversed on the way to the ending point
Function header
The comment at the top of the function's file in the game; this page's params, syntax, returns, description come from it.
/*
Description:
A* search algorithm.
Uses hard-coded Manhattan distance to measure distance.
Parameter(s):
0: ARRAY of ARRAYs in format:
0: NUMBER - node cost
1: ARRAY - array of neighbor indexes
2: ARRAY - XYZ position of the node, used to measure distance from end pos
1: NUMBER - index of starting point
2: NUMBER - index of ending point
Returns:
ARRAY of NUMBERs - indexes of nodes which are traversed on the way to the ending point
*/