Replace lines 350 and 351 with these two lines to fix compatibility on fresh installs of Windows:
@set_state = Win32API.new("XINPUT9_1_0", "XInputSetState", "IP", "V") @get_state = Win32API.new("XINPUT9_1_0", "XInputGetState", "IP", "L")XInput 1.4 is exclusive to Windows 8, so using it instead of 1.3 is a no. Pretty much any game install ever requires installing the full DirectX package as well, so it's really only a compatibility issue if you skip installing DirectX and go straight to playtesting. The current version has no real issues with Xinput 9.1.0, but I reserve the right to add features later.
Not sure about your movement issue, though it sounds like a problem with calibration. You might want to look at it in the control panel. Is MOVE_WITH_ANALOG enabled or disabled?
As for your last question, I had planned on releasing a separate addon module for more advanced vibration effects, but pretty much nobody ever asked about it (or this script) for a really long time and it got left behind. For reference, a proper vibration call looks like this:
WolfPad.vibrate(0.5, 0.5, 60, 0)That runs both motors on controller 1 at half power for 60 frames (one second). The time sensitivity is not that great, though (blame Microsoft). Also be sure that enable_vibration is set to true in PadConfig, or nothing will happen.
That's weird, actually. I tested that just now to be sure about the context the "Script" command runs in, and it worked just fine. The only way an error like that would show up is if, somehow, it didn't get registered as a module in the global scope. You did follow the in-editor instructions and install the WolfPad module in it's own page in the Materials section, right? Because if you did that it should have no trouble at all running commands like that.
Mr Lone Wolf you have a Pm, thank you for your time mate ^-^
It's all working now. No the deadzone part I was not thinking about that.. I put mine to 0.25 now.. Might be high but should be more then enough prevent that and still feels good. For the vibrate feature it works. I had this script before that disabled scripts and it seems to be conflicting before. So everything works just perfect. I gotta still learn to move a few buttons around like sprint to x and maybe A for action just because or at least maybe that is just me is use to hitting A as my main action. Might try also bind start as menu or at least another start menu there as well.
Thanks for all your help!
Any pointers or idea on how one could rebind the controller keys from inside the game? I got some players who would really want that feature since they don't agree with my controls. Thank you for being such an awesome scripter!
Edited for more efficient version.
No.. didn't notice.
Also, if you want to rebind, you can do this as an example code:
def self.attackR1 wolf = $game_variables[72].to_sym WolfPad.plugged_in? ? wolf : :SHIFTendAnd then make an event (you might need one to set the default as well so the game has something to go on). Make a "Show choices" block. And then you can use this in a script box:
$game_variables[72] = :R1The "R1" can be any of the symbols you can find under the @Keys of the main script. Game variables are whatever variable you choose to transfer these changes into the script itself.
Here are the symbols for your convenience:
:UP => 15, #d-pad up 😀OWN => 14, #d-pad left :LEFT => 13, #d-pad down :RIGHT => 12, #d-pad right :A => 3, #lower face button :B => 2, #right face button :X => 1, #left face button :Y => 0, #upper face button :L1 => 7, #upper left trigger :R1 => 6, #upper right trigger :START => 11, :SELECT => 10, :L3 => 9, #left thubstick button :R3 => 8, #right thubstick button :L2 => 16, #lower left trigger (press only) :R2 => 17, #lower right trigger (press only)Hope this will help someone. It was an fairly easy modification. Alas, so nice to be able to rebind things ^-^
I have a problem with the script: i can't use the gamepad and the keyboard at the same time, its very annoying :/