Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / XBOX 360 Controller (for PC) D-Pad/ Hat switch command?

Author
Message
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 12th Nov 2014 15:14
Hi guys & gals,

I've mapped out every single control element of the XBOX 360 controller (for PC) except for the D-Pad, which I assume would translate to the Hat switch on joysticks. Does anyone have any idea how to reference this in AppGameKit?

Thanks in advance.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 12th Nov 2014 16:07
You need v2 alpha 8 for full 360 controller support. Not yet tested though.

Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 12th Nov 2014 21:59
Ok, well the d-pad isn't very important. I'll just stick with what I've mapped. Thanks.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 12th Nov 2014 22:18
The triggers also doesn't work properly. IIRC they cancel each other out. Or maybe they did something else?

DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 12th Nov 2014 23:06
Not tried v8 but yes, earlier versions had one trigger going zero to one and one going zero to minus one. So if you pulled both you got zero. Really pleased v8 has added full support. When I get that far in my game I'll definitely be exploring the possibilities.
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 13th Nov 2014 00:18
Yeah the X axis do cancel each other out, but if you use it for some kind of directional movement it shouldn't be a problem.

Here's the code I came up with if anyone is interested. It's got enough functionality to be pretty darn useful.

Multicoder
AGK Developer
10
Years of Service
User Offline
Joined: 25th Oct 2014
Location: Germany
Posted: 13th Nov 2014 06:23
@Daniel TGC
Wow! That's a really great script! Thank you very much for sharing this with us!

Somehow the right trigger (analogue button right) is not working.
I played a bit with the script and found that you have to use GetRawJoystickRZ for the right analogue button.

Yes, I am aware that I sound like a caveman to native english speakers

Login to post a reply

Server time is: 2024-11-25 11:49:57
Your offset time is: 2024-11-25 11:49:57