---
name: "BIS_fnc_ambientFlyby"
type: function
status: ok
groups: ["Ambient"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_ambientFlyby
revid: 364496
updated: 2024-05-16T20:42:01Z
---

# BIS_fnc_ambientFlyby

*Function · Ambient · Arma 3 v1.00*

## Description

Spawns an air unit that moves from point A to point B, never engaging nor being engaged. It is set as captive and will despawn once it reaches its destination.

> [!NOTE]
> Created vehicle is [set captive](../commands/setCaptive.md), making its side [civilian](../commands/civilian.md).

## Syntax

```sqf
[startPos, endPos, altitude, speedMode, classname, side] call BIS_fnc_ambientFlyby
```

**Parameters:**

- `startPos`: [Position](../topics/Position.md) - start position of the air unit. The Z value does not matter and is replaced by *altitude*
- `endPos`: [Array](../topics/Array.md) format [PositionAGL](../topics/Position.md#positionagl) - end position where the air unit moves to and despawns (through [addWaypoint](../commands/addWaypoint.md))
- `altitude`: [Number](../topics/Number.md) - (Optional, default 100) height at which air unit will spawn and fly above ground level
- `speedMode`: [String](../topics/String.md) - (Optional, default "NORMAL") [speed mode](../commands/speedMode.md) at which air unit travels. Possible values are "LIMITED", "NORMAL" and "FULL"
- `classname`: [String](../topics/String.md) - (Optional, default "B_Heli_Light_01_F") vehicle classname defined in CfgVehicles
- `side`: [Side](../topics/Side.md) - (Optional, default [west](../commands/west.md)) side to which the vehicle belongs

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if function executed successfully.

## Examples

### Example 1

```sqf
// spawns a Littlebird that flies from position 200,200,50 to 250,250,75 at altitude 100 and normal speed
[[200,200,50], [250,250,75]] call BIS_fnc_ambientFlyby;
```

### Example 2

```sqf
[getPosATL player, getPosATL opforUnit, 400, "FULL", "B_Heli_Light_01_Armed_F", west] call BIS_fnc_ambientFlyby;
```

## See also

[createVehicle](../commands/createVehicle.md) · [BIS_fnc_spawnVehicle](../functions/BIS_fnc_spawnVehicle.md)

<sub>Source: [BI Community Wiki — BIS fnc ambientFlyby](https://community.bistudio.com/wiki/BIS_fnc_ambientFlyby) (revision 364496).</sub>
