inputController: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Some wiki formatting)
(5 intermediate revisions by the same user not shown)
Line 3: Line 3:
|game1= arma3
|game1= arma3
|version1= 2.08
|version1= 2.08
|branch=dev


|gr1= Interaction
|gr1= Interaction


|descr= Returns the state of controller inputs. The controller is a standard XBOX controller which is selected with Windows XBOX controller scheme. The input could be:
|descr= Returns the state of controller inputs. The controller is a standard XBOX controller which is selected with Windows XBOX controller scheme. The input can be:
{{Columns|4|
* XBOX_A 0
* XBOX_A 0
* XBOX_B 1
* XBOX_B 1
Line 32: Line 32:
* XBOX_RightThumbXLeft 22
* XBOX_RightThumbXLeft 22
* XBOX_RightThumbYDown 23
* XBOX_RightThumbYDown 23
|shrink= y}}


|s1= [[inputController]] input
|s1= [[inputController]] input
Line 39: Line 40:
|r1= [[Number]] - value of the controller input 0...1. When input is -1, return is 1 if controller is available, 0 - if controller is unavailable  
|r1= [[Number]] - value of the controller input 0...1. When input is -1, return is 1 if controller is available, 0 - if controller is unavailable  


|x1= State of the fire trigger:<code>[[onEachFrame]] { [[hintSilent]] [[str]] [[inputController]] 13 };</code>
|x1= State of the fire trigger:
<sqf>onEachFrame { hintSilent str inputController 13 };</sqf>


|seealso= [[inputMouse]] [[inputAction]] [[actionKeys]] [[actionKeysImages]] [[actionKeysNames]] [[actionIDs]] [[actionParams]] [[addAction]] [[setUserActionText]] [[inGameUISetEventHandler]], [[showHUD]], [[removeAction]], [[removeAllActions]], [[action]]
|seealso= [[inputMouse]] [[inputAction]] [[actionKeys]] [[actionKeysImages]] [[actionKeysNames]] [[actionIDs]] [[actionParams]] [[addAction]] [[setUserActionText]] [[inGameUISetEventHandler]] [[showHUD]] [[removeAction]] [[removeAllActions]] [[action]]
}}
}}

Revision as of 13:41, 3 May 2022

Hover & click on the images for description

Description

Description:
Returns the state of controller inputs. The controller is a standard XBOX controller which is selected with Windows XBOX controller scheme. The input can be:
  • XBOX_A 0
  • XBOX_B 1
  • XBOX_X 2
  • XBOX_Y 3
  • XBOX_Up 4
  • XBOX_Down 5
  • XBOX_Left 6
  • XBOX_Right 7
  • XBOX_Start 8
  • XBOX_Back 9
  • XBOX_LeftBumper 10
  • XBOX_RightBumper 11
  • XBOX_LeftTrigger 12
  • XBOX_RightTrigger 13
  • XBOX_LeftThumb 14
  • XBOX_RightThumb 15
  • XBOX_LeftThumbXRight 16
  • XBOX_LeftThumbYUp 17
  • XBOX_RightThumbXRight 18
  • XBOX_RightThumbYUp 19
  • XBOX_LeftThumbXLeft 20
  • XBOX_LeftThumbYDown 21
  • XBOX_RightThumbXLeft 22
  • XBOX_RightThumbYDown 23
Groups:
Interaction

Syntax

Syntax:
inputController input
Parameters:
input: Number - controller input 0...31 (see description) or -1 for controller detection.
Return Value:
Number - value of the controller input 0...1. When input is -1, return is 1 if controller is available, 0 - if controller is unavailable

Examples

Example 1:
State of the fire trigger:
onEachFrame { hintSilent str inputController 13 };

Additional Information

See also:
inputMouse inputAction actionKeys actionKeysImages actionKeysNames actionIDs actionParams addAction setUserActionText inGameUISetEventHandler showHUD removeAction removeAllActions action

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