[RMVX] HELP WITH GLITCHFINDER'S GAMEPAD INPUT MODULE

Posts

Pages: 1
I was looking for a script that allow my projects to use the XBox360 controller without any configuration through the F1 Properties menu. If you try to use one, you can only configurate the main buttons, but not the Joysticks or D-Pad controls. The, when you play the game, you can only move your characters or commands through menus with the left stick.

I think I found the best script to solve that problem, the Glitchfinder's Gamepad Input Module, but there's a problem: this is only an scripting tool, only for those who know about scripting. When I use this script and the Input DLL inside my project, the only thing which works is the green light from the gamepad, and nothing more; the gamepad controls are the same as the Properties menu configurations.

I don't know too much about RGSS2 or Ruby in general, that's the reason I need your help here. I need to make the XBox360 controllers working in my project with predefined controls.

Thanks in advance!
Looks like the input module just needs to be expanded to account for when the user uses the dpad. I can take a look at this on the weekend, it shouldn't be difficult, alias the Input.press?/trigger?/repeat?/release? methods (I forget how to do this with static memthods though) and if the user is checking against the direction inputs then also check for the gamepad dpad inputs. Something like:

alias press_gamepad press unless $@ # THIS DOESN'T WORK on static methods but it's here as an example
def self.press?(button)
  input_result = press_gamepad(button)
  case button
    when Input::UP
      return input_result or Gamepad.press?(Gamepad::DPAD_UP)
    when Input::DOWN
      return input_result or Gamepad.press?(Gamepad::DPAD_DOWN)
    else
      return input_result
  end
end

(from memory so I'm likely forgetting the correct Input signature and constants)
Pages: 1