land: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ")
m (Some wiki formatting)
 
(24 intermediate revisions by 2 users not shown)
Line 30: Line 30:
|descr= Forces a helicopter landing.
|descr= Forces a helicopter landing.


|s1= helicopter '''land''' mode
|s1= helicopter [[land]] mode


|p1= helicopter: [[Object]]
|p1= helicopter: [[Object]]


|p2= mode: [[String]] - Can be:
|p2= mode: [[String]] - can be one of:
* "LAND" - Ccomplete stop
* "LAND" - Complete stop
* "GET IN" - Hovering very low, for another unit to get in
* "GET IN" - Hovering very low, for another unit to get in
* "GET OUT" - Hovering low, for another unit to get out
* "GET OUT" - Hovering low, for another unit to get out
* "NONE" - Cancel a landing, '''since {{arma2}}'''
* {{GVI|arma2|1.00|size= 0.75}} "NONE" - Cancel a landing


|r1= [[Nothing]]
|r1= [[Nothing]]
 
|x1= <code>_cobraOne '''land''' "LAND";</code>


|seealso= [[landAt]], [[allAirports]]
|x1= <sqf>_cobraOne land "LAND";</sqf>
 
|seealso= [[landAt]] [[allAirports]]
}}
}}


<dl class="command_description">
{{Note
<dt><dt>
|user= Hardrock
<dd class="notedate">Posted on August 4, 2006 - 10:56</dd>
|timestamp= 20060804105600
<dt class="note">[[User:Hardrock|hardrock]]<dd class="note">''Notes from before the conversion:''
|text= ''Notes from before the conversion:''
Helos will land at the nearest "H" or "Invisible H", if there is one around (within 500m in {{arma1}}).
Helos will land at the nearest "H" or "Invisible H", if there is one around (within 500m in {{arma1}}).
<dt><dt>
}}
<dd class="notedate">
 
<dt class="note">[[User:=\SNKMAN/=|=\SNKMAN/=]]</dt>
{{Note
<dd class="note">To make a helicopter LAND correctly and not hovering over the landing position use [[unitReady]] to check if the helicopter already has reached his destination.
|user= SNKMAN
|timestamp= 20100926120200
|text= To make a helicopter LAND correctly and not hovering over the landing position use [[unitReady]] to check if the helicopter already has reached his destination.
You can fix a landing bug by using a short delay bevore checking the [[unitReady]] command.
You can fix a landing bug by using a short delay bevore checking the [[unitReady]] command.


<code>_helicopter [[move]] [[getPos]] _destination;
<sqf>
[[sleep]] 3;
_helicopter move getPosATL _destination;
[[while]] { [[alive]] _helicopter) && ![[unitReady]] _helicopter } [[do]]
sleep 3;
while { alive _helicopter && not unitReady _helicopter } do
{
{
      [[sleep]] 1;
sleep 1;
};
};


[[if]] ([[alive]] _helicopter) [[then]]
if (alive _helicopter) then
{
{
      _helicopter [[land]] "LAND";
_helicopter land "LAND";
};</code>
};
</dl>
</sqf>
}}

Latest revision as of 15:46, 20 March 2023

Hover & click on the images for description

Description

Description:
Forces a helicopter landing.
Groups:
Unit Control

Syntax

Syntax:
helicopter land mode
Parameters:
helicopter: Object
mode: String - can be one of:
  • "LAND" - Complete stop
  • "GET IN" - Hovering very low, for another unit to get in
  • "GET OUT" - Hovering low, for another unit to get out
  • Logo A2.png1.00 "NONE" - Cancel a landing
Return Value:
Nothing

Examples

Example 1:
_cobraOne land "LAND";

Additional Information

See also:
landAt 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
Hardrock - c
Posted on Aug 04, 2006 - 10:56 (UTC)
Notes from before the conversion: Helos will land at the nearest "H" or "Invisible H", if there is one around (within 500m in Armed Assault).
SNKMAN - c
Posted on Sep 26, 2010 - 12:02 (UTC)
To make a helicopter LAND correctly and not hovering over the landing position use unitReady to check if the helicopter already has reached his destination. You can fix a landing bug by using a short delay bevore checking the unitReady command.
_helicopter move getPosATL _destination; sleep 3; while { alive _helicopter && not unitReady _helicopter } do { sleep 1; }; if (alive _helicopter) then { _helicopter land "LAND"; };