Any way to detect Microsoft Sidewinder Dpad?

Get help using Construct 2

Post » Wed Jun 26, 2013 1:14 pm

Enter the code where? I'm not web developer... I dont understand how to do this, or in what part of the browser's interface.

thanks,
Mike
B
47
S
9
G
4
Posts: 421
Reputation: 6,959

Post » Wed Jun 26, 2013 1:19 pm

Sorry, you have to enter this in the Javascript console. On chrome, F12 will make the debugger show up, and there is a tab "Console" in it. There, just enter the code I gave you, and submit it (enter). Then, plug in your controler. If it's detected (i.e. if the browser gets a hand on it and gives it to your page), there will be an alert and some debug in the console.
If not, you will have to use third party software as javascript would then be unable to access the controller at all.
B
17
S
8
G
4
Posts: 461
Reputation: 6,087

Post » Wed Jun 26, 2013 1:34 pm

Hi again, Still no luck...I bring up the console, but can't sucessfully paste your code anywhere...at least not without an error message. I have no idea what I'm doing....and if construct 2 is already using this same code to check for the control pad and it doesnt detect any presses, or when its removed or plugged in, then I guess my only bet is to tell the client to use joytokey for now and try and convinced the web developers to make sure more controllers are supported.

thanks again.

Mike
B
47
S
9
G
4
Posts: 421
Reputation: 6,959

Post » Wed Jun 26, 2013 1:46 pm

Well, last try ? I put up an HTML page executing exactly the code I linked you before, the test is still the same : once the page is open, plug in the controller.
It's not exactly the same code as in the plugin. The plugin checks lots of thinks, like what browser it is, what gamepad, if it knows how to map it, ... (witch could explain that the sample capx didn't trigger anything, if C2 ignores unknown gamepads). The function I used is only here to tell if your controller is usable by the browser, if it's detected when plugged in.
B
17
S
8
G
4
Posts: 461
Reputation: 6,087

Post » Wed Jun 26, 2013 2:06 pm

I did so with both chrome and firefox AND with the Sidewinder and the Xbox controller and nothing ever happens...is a message supposed o appear somewhere? if so, where? It should definately work at least with the XBox controller but I see nothing. :(
B
47
S
9
G
4
Posts: 421
Reputation: 6,959

Post » Wed Jun 26, 2013 2:11 pm

Sorry, I'm not at home and don't have a controller to test it and debug it here. I'll try to come back to you on the subject tonight.
If anyone has another idea on how to map this DPad, it's welcome ^^Guizmus2013-06-26 14:12:01
B
17
S
8
G
4
Posts: 461
Reputation: 6,087

Post » Wed Jun 26, 2013 4:19 pm

Thanks so much for your help Guizmus. I really apreciate your time and effort.
B
47
S
9
G
4
Posts: 421
Reputation: 6,959

Post » Wed Jun 26, 2013 9:15 pm

@Brashmonkey
Ok, so I updated the gamepad test capx. Could you try again ?
After testing with XboX pad, it works fine. Sprite should be moving with the gamepad.
Clear button is usefull to check if any gamepad is detected, and print its ID.Guizmus2013-06-26 21:17:17
B
17
S
8
G
4
Posts: 461
Reputation: 6,087

Post » Wed Jun 26, 2013 10:22 pm

Well...
I liked that subject...
I made a key mapper with C2...
Please send a screenshot when you've set all the keys, if the gamepad is detected by the the browser.
It's quite self explaining otherwise, input in center of joystick is by clicking on the joystick. X and Y Axis of the joysticks are "hit" when the joystick hits 100% bottom or right respectively (left and up are not to check).
capx
Screenshot
B
17
S
8
G
4
Posts: 461
Reputation: 6,087

Post » Wed Jun 26, 2013 11:38 pm

[QUOTE=Guizmus] @Brashmonkey
Ok, so I updated the gamepad test capx. Could you try again ?
After testing with XboX pad, it works fine. Sprite should be moving with the gamepad.
Clear button is usefull to check if any gamepad is detected, and print its ID.[/QUOTE]

Xbox controller works great, is detected (after a button push) and then moves the sprite. Sidewinder is never detected no matter what. :(
B
47
S
9
G
4
Posts: 421
Reputation: 6,959

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: mekonbekon, PreacH, tetuan, Yahoo [Bot] and 7 guests