Difference between revisions of "Lua:getXBox360ControllerState"

From Cheat Engine
Jump to navigation Jump to search
(Replaced content with '<span style="font-size:25px;color:red">Sorry! Content not available.</span>')
m (Reverted edits by This content is not available (Talk) to last revision by FreeER)
 
Line 1: Line 1:
<span style="font-size:25px;color:red">Sorry! Content not available.</span>
+
[[Category:Lua]]
 +
'''function''' getXBox360ControllerState(''ControllerID'' OPTIONAL)
 +
 
 +
Returns a table containing the following fields on success (returns nothing/nil on failure):
 +
 
 +
=== Function Parameters ===
 +
 
 +
{|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0"
 +
!align="left"|Index
 +
!align="left"|Type
 +
!style="width: 80%;background-color:white;" align="left"|Description
 +
    |-
 +
    |ControllerID
 +
    |integer
 +
    |The id of the controller (between 0 and 3)
 +
    |-
 +
    |PacketNumber
 +
    |integer
 +
    |The packet id of the state you see. (use to detect changes)
 +
    |-
 +
    |GAMEPAD_DPAD_UP
 +
    |boolean
 +
    |D-PAD Up
 +
    |-
 +
    |GAMEPAD_DPAD_DOWN
 +
    |boolean
 +
    |D-PAD Down
 +
    |-
 +
    |GAMEPAD_DPAD_LEFT
 +
    |boolean
 +
    |D-PAD Left
 +
    |-
 +
    |GAMEPAD_DPAD_RIGHT
 +
    |boolean
 +
    |D-PAD Right
 +
    |-
 +
    |GAMEPAD_START
 +
    |boolean
 +
    |Start button
 +
    |-
 +
    |GAMEPAD_BACK
 +
    |boolean
 +
    |Back button
 +
    |-
 +
    |GAMEPAD_LEFT_THUMB
 +
    |boolean
 +
    |Left thumb stick down
 +
    |-
 +
    |GAMEPAD_RIGHT_THUMB
 +
    |boolean
 +
    |Right thumb stick down
 +
    |-
 +
    |GAMEPAD_LEFT_SHOULDER
 +
    |boolean
 +
    |Left shoulder button
 +
    |-
 +
    |GAMEPAD_RIGHT_SHOULDER
 +
    |boolean
 +
    |Right shoulder button
 +
 
 +
    |-
 +
    |GAMEPAD_A
 +
    |boolean
 +
    |A button
 +
    |-
 +
    |GAMEPAD_B
 +
    |boolean
 +
    |B button
 +
    |-
 +
    |GAMEPAD_X
 +
    |boolean
 +
    |X button
 +
    |-
 +
    |GAMEPAD_Y
 +
    |boolean
 +
    |Y button
 +
 
 +
    |-
 +
    |LeftTrigger
 +
    |integer ranging from 0 to 255
 +
    |Left trigger
 +
    |-
 +
    |RightTrigger
 +
    |integer ranging from 0 to 255
 +
    |Right trigger
 +
 
 +
    |-
 +
    |ThumbLeftX
 +
    |integer ranging from -32768 to 32767
 +
    |Horizontal position of the left thumbstick
 +
    |-
 +
    |ThumbLeftY
 +
    |integer ranging from -32768 to 32767
 +
    |Verital position of the left thumbstick
 +
    |-
 +
    |ThumbRightX
 +
    |integer ranging from -32768 to 32767
 +
    |Horizontal position of the right thumbstick
 +
    |-
 +
    |ThumbRightY
 +
    |integer ranging from -32768 to 32767
 +
    |Vertical position of the right thumbstick
 +
|}
 +
 
 +
 
 +
== See also ==
 +
* [[Lua]]
 +
* [[Help_File:Script engine|Script engine]]
 +
 
 +
=== Related Functions ===
 +
* [[Lua:setXBox360ControllerVibration|setXBox360ControllerVibration]]

Latest revision as of 19:07, 18 March 2019

function getXBox360ControllerState(ControllerID OPTIONAL)

Returns a table containing the following fields on success (returns nothing/nil on failure):

Function Parameters[edit]

Index Type Description
ControllerID integer The id of the controller (between 0 and 3)
PacketNumber integer The packet id of the state you see. (use to detect changes)
GAMEPAD_DPAD_UP boolean D-PAD Up
GAMEPAD_DPAD_DOWN boolean D-PAD Down
GAMEPAD_DPAD_LEFT boolean D-PAD Left
GAMEPAD_DPAD_RIGHT boolean D-PAD Right
GAMEPAD_START boolean Start button
GAMEPAD_BACK boolean Back button
GAMEPAD_LEFT_THUMB boolean Left thumb stick down
GAMEPAD_RIGHT_THUMB boolean Right thumb stick down
GAMEPAD_LEFT_SHOULDER boolean Left shoulder button
GAMEPAD_RIGHT_SHOULDER boolean Right shoulder button
GAMEPAD_A boolean A button
GAMEPAD_B boolean B button
GAMEPAD_X boolean X button
GAMEPAD_Y boolean Y button
LeftTrigger integer ranging from 0 to 255 Left trigger
RightTrigger integer ranging from 0 to 255 Right trigger
ThumbLeftX integer ranging from -32768 to 32767 Horizontal position of the left thumbstick
ThumbLeftY integer ranging from -32768 to 32767 Verital position of the left thumbstick
ThumbRightX integer ranging from -32768 to 32767 Horizontal position of the right thumbstick
ThumbRightY integer ranging from -32768 to 32767 Vertical position of the right thumbstick


See also[edit]

Related Functions[edit]