Arma 3 Scripting

Command in Object Manipulation

flyInHeight

Also available as Markdown and JSON, or read the original wiki page.

Description

Sets the flying altitude for aircraft relatively to the ground surface. Avoid too low altitudes, as helicopters and planes won't evade trees and obstacles on the ground. The default flying altitude is 100 meters. The minimum height is 20 meters.

Note

Height measurement is relative to the pilot and can be approximated with ASLToAGL eyePos driver _aircraft;.

Syntax

Syntax 1

aircraft flyInHeight altitude

Parameters:

Returns: Nothing

Syntax 2

since arma3 2.14

aircraft flyInHeight [altitude, forced]

Parameters:

Returns: Nothing

Examples

Example 1

_helicopter flyInHeight 40;

Example 2

// for altitudes below 10m
_helicopter flyInHeight 5;            // helicopter will land
_helicopter flyInHeight [5, true];    // helicopter will hover at 5m altitude

// on a landed helicopter
_helicopter flyInHeight 50;            // helicopter will not move until a waypoint is added
_helicopter flyInHeight [50, true];    // helicopter will start to rise immediately

See also

flyInHeightASL

Community notes

Hardrock

Notes from before the conversion:

From Operation Flashpoint v1.80 - flyInHeight now affects not only helicopters, but also planes.

Kronzky

A flyInHeight of 0 will keep the chopper pinned to the ground, even when the engines have been started.

Jtgibson

If a helo has no waypoints, it will assume a low hover without regard to this setting.

Important

This comment does not apply to the alternative syntax.

OverlordZorn

As of 2.20:

  • when altitude is greater or equal 10, collision avoidance will maintain priority and the rotary airframe stays around 20~35 meters ATL, depending on nearby objects.

  • when altitude is lower then 10, for example, 9.99999, it seems that collision avoidance is disabled and the airframe will maintain the desired ATL.