Lua:getXBox360ControllerState

From Cheat Engine
Jump to navigation Jump to search

function getXBox360ControllerState(ControllerID OPTIONAL)

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

Function Parameters

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

Related Functions