isTouchingGround: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<sqf>([^ ]+) <\/sqf>" to "<sqf>$1</sqf>")
m (Text replacement - ">Posted on November ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-11-$1")
(3 intermediate revisions by the same user not shown)
Line 23: Line 23:


<dt></dt>
<dt></dt>
<dd class="notedate">Posted on June 1, 2014 - 01:23 (UTC)</dd>
<dd class="notedate">Posted on 2014-06-01 - 01:23 (UTC)</dd>
<dt class="note">[[User:AgentRevolution|AgentRevolution]]</dt>
<dt class="note">[[User:AgentRevolution|AgentRevolution]]</dt>
<dd class="note">
<dd class="note">
Line 30: Line 30:


<dt><dt>
<dt><dt>
<dd class="notedate">Posted on September 29, 2016 - 08:28 (UTC)</dd>
<dd class="notedate">Posted on 2016-09-29 - 08:28 (UTC)</dd>
<dt class="note">[[User:Demellion|Demellion]]</dt>
<dt class="note">[[User:Demellion|Demellion]]</dt>
<dd class="note">
<dd class="note">
Line 41: Line 41:


<dt><dt>
<dt><dt>
<dd class="notedate">Posted on November 10, 2016 - 20:57 (UTC)</dd>
<dd class="notedate">Posted on 2016-11-10 - 20:57 (UTC)</dd>
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt>
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt>
<dd class="note">
<dd class="note">
Line 48: Line 48:


<dt><dt>
<dt><dt>
<dd class="notedate">Posted on April 26, 2017 - 20:02 (UTC)</dd>
<dd class="notedate">Posted on 2017-04-26 - 20:02 (UTC)</dd>
<dt class="note">[[User:Gippo|Gippo]]</dt>
<dt class="note">[[User:Gippo|Gippo]]</dt>
<dd class="note">
<dd class="note">

Revision as of 00:13, 14 May 2023

Hover & click on the images for description

Description

Description:
Returns true if object is touching the ground.
Groups:
Object Manipulation

Syntax

Syntax:
isTouchingGround object
Parameters:
object: Object
Return Value:
Boolean

Examples

Example 1:
if (isTouchingGround player) then {hint "Terraferma!";};

Additional Information

See also:
underwater

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
Posted on 2014-06-01 - 01:23 (UTC)
AgentRevolution
If you are using this command as a validation method, it should not be the sole thing you are checking for, as the result is often inaccurate. For example, it returns false for some helicopters when landed on the roof of certain buildings, and it always returns false for boats, even if they are beached.
Posted on 2016-09-29 - 08:28 (UTC)
Demellion
In addition to previous statement: That behaviour is true, simply because isTouchingGround applied to a player unit (or any unit) is frozen to a last state when unit enters vehicle. To get proper return from this command you should go for units vehicle:
_var = isTouchingGround player // Unreliable _var = isTouchingGround (vehicle player) // Pretty reliable
Posted on 2016-11-10 - 20:57 (UTC)
Pierre MGI
This command returns always true if the falling object is attached to some other object with the command attachTo, like for vehicle air drop with parachute.
Posted on 2017-04-26 - 20:02 (UTC)
Gippo
Be aware: it is not reliable on remote objects.