Description
Order an AI airplane to land at a given airport. ID is the number to identify which map airport you want the airplane to land at. See Arma: Airport IDs for more information. See also land.
Note
Arma 3: - Arma 3 v1.68 it is possible to also make the airplane land at a dynamic airport object (e.g. aircraft carrier, makeshift runway...) – see #Example 2
- Arma 3 v2.18 it is also possible to make a helicopter land at a specific helipad.
Note
Since Arma 3 v2.20 landAt command has been extended. Helicopter can now be landed not only on a helipad but also at arbitrary position, provided that it is empty and can accomodate the helicopter. In "Land" landing mode the helicopter lands permanently, while in "GetIn" and "GetOut" landing mode the helicopter performs a short touch down before going to the next waypoint. In order to make helicopter wait, the 'waitTime' param can be used. Landing mode "None" cancels both, the landing in progress and waiting in progress. Waiting time is available with landAt getter variant. When helicopter is landing, the time shown is the set time for wating, however when helicopter is landed, this time start counting down to 0, after which helicopter will take off if it has a waypoint to go to. The AI pilot state can be monitored with getUnitState command. The helicopter has to be local to the machine executing the command. VTOL waiting time is not supported
Syntax
Syntax 1
plane landAt ID
Parameters:
plane: Object - a planeID: Number - Airport ID
Returns: Nothing
Syntax 2
since arma3 1.68
plane landAt airportObject
Parameters:
Returns: Nothing
Syntax 3
since arma3 2.18
heli landAt [position, mode, waitTime, putOnSurface]
Parameters:
heli: Object - Helicopter/VTOL aircraftposition: Object or Arma 3 v2.20 PositionWorld - a helipad object of helipad type (can be an invisible helipad) or PositionWorld to land at.mode: String - one of "None", "Get In", "Get Out", "Land" and since Arma 3 v2.20 also "GetIn", "GetOut".waitTime: Number - (Optional) (Helicopter type only) time to wait after touch down in "GetIn"/"GetOut" mode before taking off to the next waypoint. Default: -1. (since arma3 2.20)putOnSurface: Boolean - (Optional) when true, the given land position will be adjusted to the nearest surface underneath. Default: false. (since arma3 2.20)
Returns: Boolean - Returns true if landing command was processed successfully, false if failed.
Syntax 4
since arma3 2.20
landAt heli
Parameters:
heli: Object - Helicopter/VTOL aircraft
Returns: Array with [landMode, landResult, landPosition, waitTime, autopilotState]
- landMode: String - one of the following: "None", "Land", "GetIn", "GetOut" or "".
- landResult: String - one of the following: "Found", "NotFound", "NotReady" or "".
- landPosition: PositionWorld - land position or [0,0,0].
- waitTime: Number - (Helicopter type only) before heli is landed - wait time set for "GetIn"/"GetOut" mode, after heli is landed - remaining time before take off to the next waypoint or -1.
- autopilotState: String - one of the following: "FAR", "BRAKE", "NEAR", "ALIGN", "REACHED", "LOITER", "FOLLOW" or "".
Examples
Example 1
_plane1 landAt 1;
Example 2
_dynamicAirport1 = "DynamicAirport_01_F" createVehicle position player;
_plane1 landAt _dynamicAirport1;
Example 3
_hpad = "Land_HelipadEmpty_F" createVehicle [0,0,0];
_hpad setPosASL _pos;
heli landAt [_hpad, "LAND"];
Example 4
heli landAt [getPosWorld player vectorAdd [10,10,0], "GetIn", 30];
See also
Arma: Airport IDs · land · setAirportSide · assignToAirport · allAirports