inputAction: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (*note* doesn't support mouse buttons)
Line 70: Line 70:
<dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt>
<dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt>
<dd class="note">
<dd class="note">
'''inputAction''' is also capable of returning the state of analog inputs. This includes mouse and joystick. Joystick controls will return a value from 0 to 1, while mouse returns the rate of change, which can be > 1.
'''inputAction''' is capable of returning the state of analog inputs. This includes mouse and joystick. A joystick axis will return a value from 0 to 1, while mouse movement returns the rate of change, which can be > 1. '''inputAction''' doesn't seem to support mouse button input, however.
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Revision as of 07:41, 31 July 2015

Hover & click on the images for description

Description

Description:
Return the state of input devices mapped to given input action.
For Arma 3 inputActions see: inputAction/actions.
For Arma 3 inputActions bindings see: inputAction/actions/bindings.
For earlier Arma editions see Category:Key Actions.
Groups:
Uncategorised

Syntax

Syntax:
inputAction name
Parameters:
name: String - name of the action
Return Value:
Number

Examples

Example 1:
inputAction "leanLeft" Returns 1 if the button mapped to "leanLeft" is pressed currently else 0.
Example 2:
[] spawn { waitUntil {inputAction "reloadMagazine" > 0}; hint "Reload Key Pressed"; };

Additional Information

See also:
actionKeysactionKeysImagesactionKeysNamesaction

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

Posted on 07:38, 15 October 2010 (CEST)
Worldeater
This command also returns values other than 0 and 1 (like 0.02 or 1.3). Any value greater than zero usually signals that the key or button is pressed. inputAction does not work reliably when used in RscDisplayMission's onKeyDown event handler (the same is probably true for other input related event handlers).

Bottom Section

Posted on May 8, 2014 - 15:18 (UTC)
FlannelMouth
inputAction does not return the actual state of the queried key when a dialog screen is open. Instead, it will always return 0.
Posted on July 31, 2015 - 05:33 (UTC)
Waffle SS.
inputAction is capable of returning the state of analog inputs. This includes mouse and joystick. A joystick axis will return a value from 0 to 1, while mouse movement returns the rate of change, which can be > 1. inputAction doesn't seem to support mouse button input, however.