Jump to content

Add Xbox buttons for Character mod - Coding help

Recommended Posts

Hello! I've made a character mod that uses special attacks when pressing R and T on the keyboard. I was wondering if it was possible to add Xbox buttons too, to enable the attacks when I play with a controller. If it's possible, how may I proceed for the coding?

Here's the keybinding code for the keyboard:

local fire_attack = GLOBAL.KEY_R
local protective_shield = GLOBAL.KEY_T


Thanks! :)

Link to comment
Share on other sites

Maybe this will help?


  1. D-pad up: joystick button 5
  2. D-pad down: joystick button 6
  3. D-pad left: joystick button 7
  4. D-pad right: joystick button 8
  5. start: joystick button 9
  6. back: joystick button 10
  7. left stick(click): joystick button 11
  8. right stick(click): joystick button 12
  9. left bumper: joystick button 13
  10. right bumper: joystick button 14
  11. center("x") button: joystick button 15
  12. A: joystick button 16
  13. B: joystick button 17
  14. X: joystick button 18
  15. Y: joystick button 19
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...