inputAction: Difference between revisions
Jump to navigation
Jump to search
m (Text replace - "{{uc:{{PAGENAME}}}}" to "{{uc:{{PAGENAME}}}} {{uc:{{PAGENAME}}}}") |
Killzone Kid (talk | contribs) No edit summary |
||
Line 17: | Line 17: | ||
|x1= <code> | |x1= <code>[[inputAction]] "leanLeft"</code> Returns 1 if the button mapped to "leanLeft" is pressed currently else 0. |= EXAMPLE1 | ||
|x2= <code>[] [[spawn]] { | |||
[[waitUntil]] {[[inputAction]] "reloadMagazine" > 0}; | |||
[[hint]] "Reaload Key Pressed"; | |||
};</code>|= EXAMPLE2 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ |
Revision as of 14:32, 24 August 2013
Description
- Description:
- Return the state of input devices mapped to given input action (see Category:Key Actions for action names).
- Groups:
- Uncategorised
Syntax
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 "Reaload Key Pressed"; };
Additional Information
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
-
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).
--Worldeater 07:38, 15 October 2010 (CEST)