landAt: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *A([a-z ])" to "$1 - a$2")
(Add landAt for helicopters)
Line 26: Line 26:
|descr= 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.
|descr= 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.
{{Feature | arma3 | Since Arma 3 v1.68 it is possible to also make the airplane land at a [[Arma 3: Dynamic Airport Configuration|dynamic airport]] [[object]] (e.g. aircraft carrier, makeshift runway...) – see '''Example 2'''.}}
{{Feature | arma3 | Since Arma 3 v1.68 it is possible to also make the airplane land at a [[Arma 3: Dynamic Airport Configuration|dynamic airport]] [[object]] (e.g. aircraft carrier, makeshift runway...) – see '''Example 2'''.}}
{{Feature|important|To make a '''helicopter''' land see [[land]] command.}}
{{Feature|important|To make a '''helicopter''' land there is also the [[land]] command.}}


|s1= plane [[landAt]] ID
|s1= plane [[landAt]] ID
Line 45: Line 45:


|r2= [[Nothing]]
|r2= [[Nothing]]
|s3= heli landAt [heliPad, mode]
|s3since= arma3 2.16
|p41= heli: [[Object]] - Helicopter/VTOL aircraft
|p42= heliPad: [[Object]] - A helipad object (can be an invisible helipad)
|p43= mode: [[String]] - Landing mode. See the [[land]] command
|r3= [[Boolean]] - Returns [[true]] if landing command was issued successfully. [[false]] if failed.


|x1= <sqf>_plane1 landAt 1;</sqf>
|x1= <sqf>_plane1 landAt 1;</sqf>
Line 50: Line 62:
|x2= <sqf>_dynamicAirport1 = "DynamicAirport_01_F" createVehicle position player;
|x2= <sqf>_dynamicAirport1 = "DynamicAirport_01_F" createVehicle position player;
_plane1 landAt _dynamicAirport1;</sqf>
_plane1 landAt _dynamicAirport1;</sqf>
|x3= <sqf>_hpad = "Land_HelipadEmpty_F" createVehicle [0,0,0];
_hpad setPosASL _pos;
heli landAt [_hpad, "LAND"];
</sqf>


|seealso= [[Arma: Airport IDs]] [[land]] [[setAirportSide]] [[assignToAirport]] [[allAirports]]
|seealso= [[Arma: Airport IDs]] [[land]] [[setAirportSide]] [[assignToAirport]] [[allAirports]]
}}
}}

Revision as of 22:01, 13 January 2024

Hover & click on the images for description

Description

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.
Arma 3
Since 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.
To make a helicopter land there is also the land command.
Groups:
Unit ControlRoads and Airports

Syntax 1

Syntax:
plane landAt ID
Parameters:
plane: Object - a plane
ID: Number - Airport ID
Return Value:
Nothing

Syntax 2

Syntax:
plane landAt airportObject
Parameters:
plane: Object
airportObject: Object
Return Value:
Nothing

Syntax 3

Syntax:
heli landAt [heliPad, mode]
Parameters:
heli: Object - Helicopter/VTOL aircraft
heliPad: Object - A helipad object (can be an invisible helipad)
mode: String - Landing mode. See the land command
Return Value:
Boolean - Returns true if landing command was issued successfully. false if failed.

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"];

Additional Information

See also:
Arma: Airport IDs land setAirportSide assignToAirport allAirports

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note