Jump to content


Photo

Xbox 360 Controller Library


  • Please log in to reply
65 replies to this topic

#41 CoolDude330

CoolDude330

    The Cool Guy

  • GMC Member
  • 242 posts

Posted 12 July 2008 - 05:16 AM

This is a fantastic lib, works great with my wireless 360 controller!
  • 0

#42 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 12 July 2008 - 06:24 AM

CoolDude, do you happen to have one of those MS adapters for their wireless controllers?
  • 0

#43 morno

morno

    GMC Member

  • New Member
  • 193 posts

Posted 12 July 2008 - 04:17 PM

can you make this in GML code? i dont like D&D
  • 0

#44 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 13 July 2008 - 06:40 AM

Yup, in fact, I did my work with the 360 controller with scripts first.

// xbox_controller_init();

globalvar XB_A, XB_B, XB_X, XB_Y, XB_RTHUMB, XB_LTHUMB, XB_RSHOULDER, XB_LSHOULDER;
globalvar XB_RTRIGGER, XB_LTRIGGER, XB_BACK, XB_START XB_DPAD;

XB_A = 1;
XB_B = 2;
XB_X = 3;
XB_Y = 4;

XB_RTHUMB_X = 5;
XB_RTHUMB_Y = 6;

XB_LTHUMB_X = 7;
XB_LTHUMB_Y = 8;

XB_RSHOULDER = 9;
XB_LSHOULDER = 10;

XB_RTRIGGER = 11
XB_LTRIGGER = 12;

XB_BACK = 13;
XB_START = 14;

XB_DPAD = 15;

XB_LTHUMB_B = 16;
XB_RTHUMB_B = 17;

// xbox_controller_check(id,button);
// Returns the data concerning the button given

switch argument1
{
 case XB_A : return joystick_check_button(argument0,1);
 case XB_B : return joystick_check_button(argument0,2);
 case XB_X : return joystick_check_button(argument0,3);
 case XB_Y : return joystick_check_button(argument0,4);

 case XB_RTHUMB_X : return joystick_rpos(argument0);
 case XB_RTHUMB_Y : return joystick_upos(argument0);

 case XB_LTHUMB_X : return joystick_xpos(argument0);
 case XB_LTHUMB_Y : return joystick_ypos(argument0);

 case XB_LTHUMB_B : return joystick_check_button(argument0,9);
 case XB_RTHUMB_B : return joystick_check_button(argument0,10);

 case XB_RSHOULDER : return joystick_check_button(argument0,6);
 case XB_LSHOULDER : return joystick_check_button(argument0,5);

 case XB_RTRIGGER : if joystick_zpos(argument0) > 0 then
					{ return joystick_zpos(argument0); } else { return 0; }

 case XB_LTRIGGER : if joystick_zpos(argument0) < 0 then
					{ return abs(joystick_zpos(argument0)); } else { return 0; }

 case XB_BACK  : return joystick_check_button(argument0,7);
 case XB_START : return joystick_check_button(argument0,8);

 case XB_DPAD : return joystick_pov(argument0);
}

Edited by RabbidMickeyMouse, 13 July 2008 - 06:44 AM.

  • 0

#45 morno

morno

    GMC Member

  • New Member
  • 193 posts

Posted 15 July 2008 - 06:18 AM

good. il try and make my game work whit the controller woude be cool btw my friend made a .gex of this i think. hes name is Khelder.
  • 0

#46 morno

morno

    GMC Member

  • New Member
  • 193 posts

Posted 16 July 2008 - 04:02 PM

(BUMP) here is the link for the .Gex made by Khelder! (Credit is not nessesery what i know) Khelder only make this into a .Gex so you just can implant it to you'r Game!

http://www.megaupload.com/?d=T6MGGFKJ

Hope i dont have broken some rules. the commands are xb_(whatever) when i search for the Xbox controller setting i just do xbox, and it Shows!
  • 0

#47 Shade_Games

Shade_Games

    GMC Member

  • New Member
  • 162 posts

Posted 21 July 2008 - 10:40 PM

I know Game Maker only supports two joysticks at a time. Does this limitation apply to 360 controllers as well? If so, is there any way around it?
  • 0

#48 mrsmes

mrsmes

    GMC Member

  • GMC Member
  • 972 posts
  • Version:Unknown

Posted 16 September 2008 - 11:15 AM

one word, wicked...
  • 0

#49 yellowsix

yellowsix

    GMC Member

  • New Member
  • 315 posts

Posted 17 September 2008 - 07:19 AM

I know Game Maker only supports two joysticks at a time. Does this limitation apply to 360 controllers as well? If so, is there any way around it?

Since the scripts simply wrap Game Maker's joystick functions, you still have a maximum of two.
  • 0

#50 Johnnsen

Johnnsen

    Braaaains

  • New Member
  • 418 posts

Posted 01 October 2008 - 08:29 PM

There was a way to even get rumble support. I don't know which topic or project it was, but it worked great. Does it work with this one?
  • 0

#51 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 05 October 2008 - 07:48 PM

Not that I know of by default, but yellowsix's XInput DLL supports rumble.
  • 0

#52 bobsijswinkel

bobsijswinkel

    GMC Member

  • New Member
  • 13 posts

Posted 02 November 2008 - 01:12 PM

if you install your xbox360 controller on your pc you dont need this librarie you can use the normal joystick options (mouse > joystick1)...
but your librarie has more moves so thanks for posting it.... :)
  • 0

#53 hotshotscott

hotshotscott

    GMC Member

  • New Member
  • 3483 posts

Posted 29 November 2008 - 11:51 PM

When i plug my controller into the USB port with the charger cord (is this the right one?), my computer searches for updates on the unknown usb port and then once it fails because it finds nothing, well it's basically not recognised. When i start the example up, and press buttons, nothing happens? And when i turn the controller on, my xbox turns on (behind me) and my controller is connected to it.. How do i get the PC to recognise my xbox controller?

Scotty
  • 0

#54 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 30 November 2008 - 05:58 AM

As far as I've come to read about usb chargers, they don't connect the controller to the PC in any data sharing fashion, and only rely on the 5v of power usb ports supply.

For those willing to spend the money, you can find wireless controller receivers for Windows for 20 dollars or less. I can only assume that with the wireless receiver, that Windows connects the controller like it does the wired controller, as a recognizable gamepad for GameMaker's uses. No reason it shouldn't, I believe.
  • 0

#55 Caniac

Caniac

    The #1 Caniac

  • New Member
  • 2622 posts

Posted 15 December 2008 - 06:41 PM

cool :GM072:
How about a wii controller library?

see my signiture :(

edit.
G I feel stupid,
name=]']]
:GM072:

Edited by Caniac, 15 December 2008 - 06:41 PM.

  • 0

#56 Amorment

Amorment

    GMC Member

  • New Member
  • 199 posts

Posted 29 December 2009 - 08:02 PM

Text Removed

Edited by Amorment, 09 July 2011 - 05:33 PM.

  • 0

#57 seventhyseventh

seventhyseventh

    GMC Member

  • New Member
  • 38 posts

Posted 19 August 2010 - 12:38 PM

you should try to make one for the PS3 controller because I only have a PS3 controller no an XBox controller :(
  • 0

#58 busterdash

busterdash

    GMC Member

  • GMC Member
  • 4 posts
  • Version:GM:Studio

Posted 17 September 2010 - 02:59 AM

you should try to make one for the PS3 controller because I only have a PS3 controller no an XBox controller :(


PS3 controllers aren't USB, and I don't think they have an adapter either.
  • 0

#59 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4873 posts
  • Version:GM8

Posted 17 September 2010 - 04:33 AM


you should try to make one for the PS3 controller because I only have a PS3 controller no an XBox controller :(


PS3 controllers aren't USB, and I don't think they have an adapter either.



They are USB. The adapter is also known as a bluetooth dongle.
  • 0

#60 papagiuseppi

papagiuseppi

    GMC Member

  • New Member
  • 18 posts

Posted 07 October 2010 - 06:56 AM

THANKYOU THANKYOU THANKYOU THANKYOU i have been looking for this for soooooo long
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users