mafril How do I cheat? Reputation: 1 Joined: 19 Oct 2014 Posts: 6
|
Posted: Fri May 08, 2020 1:13 pm Post subject: getPS4ControllerState |
|
|
Hello, this is my first "contribution" to CE. So, bear with me.
I made this simple DLL file that adds a similar function to getXBox360ControllerState.
Simple example:
Code: | cc = require("getPS4ControllerState")
state = cc.GAMEPAD_DPAD_DOWN()
if state then print ("pressed")
else print ("not pressed") end |
Here is a list of what you can do:
Quote: | 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_OPTIONS boolean Options button
GAMEPAD_SHARE boolean Share button
GAMEPAD_LEFT_THUMB boolean Left thumbstick down
GAMEPAD_RIGHT_THUMB boolean Right thumbstick down
GAMEPAD_LEFT_SHOULDER boolean Left shoulder button
GAMEPAD_RIGHT_SHOULDER boolean Right shoulder button
GAMEPAD_CROSS boolean Cross button
GAMEPAD_CIRCLE boolean Circle button
GAMEPAD_SQUARE boolean Square button
GAMEPAD_TRIANGLE boolean Triangle button
GAMEPAD_LEFT_TRIGGER boolean Left trigger button
GAMEPAD_RIGHT_TRIGGER boolean Right trigger button
GAMEPAD_PS boolean PS button
GAMEPAD_TOUCH_PAD boolean Press on the touchpad
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 Vertical 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
|
To install it just put the file in the CE folder.
Download:
https://mega.nz/file/qwAwyKRT#lmkd5YKNnDP0P7hQwaqGhW6x-YnrGWJEpshwWTpevsc
If there is a better way to share it or do it, please let me know.
|
|