isTouchingGround: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(code insertion) |
||
Line 57: | Line 57: | ||
In addition to previous statement: That behaviour is true, simply beacuse '''isTouchingGround''' applied to a player unit (or any unit) is frozen to a last state when unit enters vehicle. | In addition to previous statement: That behaviour is true, simply beacuse '''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]]: | To get proper return from this command you should go for units [[vehicle]]: | ||
<code> | <code>_var = isTouchingGround player // Unreliable | ||
_var = isTouchingGround (vehicle player) // Pretty reliable | |||
</code> | </code> | ||
</dd> | </dd> | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> |
Revision as of 09:28, 29 September 2016
Description
- Description:
- Returns true if object is touching the ground.
- Groups:
- Uncategorised
Syntax
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
Notes
Bottom Section
- Posted on June 1, 2014 - 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 September 29, 2016 - 08:28 (UTC)
- Demellion
-
In addition to previous statement: That behaviour is true, simply beacuse 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