---
name: "BIN_fnc_findPath"
type: function
status: ok
groups: ["Movement"]
arma3_since: "1.94"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIN_fnc_findPath
revid: 309455
updated: 2022-05-05T12:06:03Z
---

# BIN_fnc_findPath

*Function · Movement · Arma 3 v1.94*

## 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*

```sqf
[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 pos
- `param1` — 1: NUMBER - index of starting point
- `param2` — 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.

```sqf
/*
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
*/
```

<sub>Source: [BI Community Wiki — BIN fnc findPath](https://community.bistudio.com/wiki/BIN_fnc_findPath) (revision 309455).</sub>
