inputAction: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Improved link.)
Line 39: Line 39:
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 12:14, 2 November 2011

Hover & click on the images for description

Description

Description:
Return the state of input devices mapped to given input action (see Category:Key Actions for action names).
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.

Additional Information

See also:
actionKeysactionKeysImagesactionKeysNames

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)

Bottom Section