
Originally Posted by
dra6onfire
Right but what did you code for? If you coded based on onKeyPress commands using the integer values for your controller and its not one that maps the same on the ouya, you will have issues. Nostalgia works great with ouya, nyko, moga, ps3, and wireless oem xbox 360 controllers but I have recent reports from one user that usb xbox 360 controllers and non-oem ps3 controllers dont work correctly.
Oh, also if you set it up to use specifically the first player the ouya occassionally has "sticky" controllers and your ouya controller may not be the first player.
I've found "part" of the problem; when it was reading my d-pad input, that was vestigial up and down keyboard keys I'd used when initially testing on the PC. It seems GM/OUYA automaps keys to functions on the controller. The only problem is I can't figure out what other keys go with the buttons, let alone how to map it to the left stick...
This is the sort of code I've been using. Works great with the 360 controller on PC:
Code:
if gamepad_axis_value(0,gp_axislv)>0.8
and then movement code in there.

Originally Posted by
Kaimega
Remember, Game Maker on OUYA only works with OUYA controllers. If you have any other controllers paired, you have to unpair ALL controllers, and then pair the OUYA one.
Don't ask me why..something Yoyogames did

I've never used any controller with my OUYA other than OUYA controllers. I hate having to constantly pair/unpair between systems. I stomach it enough going between my 360 and PC, and that's only because I rarely use my 360 anymore.
I didn't get a crack at fiddling with it much today and I've been up for almost 48 hours at this point bar a quick nap, so I'm going to try to give it another go after I get some shuteye.
EDIT: ALRIGHT HERE'S WHAT I GOT
Went to 2 player mode and all of the stuff I had programmed for player 1 to do, happens with player two :| Wrote up a script to tell me what controllers are attached, and it tells me this, verbatim:
"No Gamepad Connected
OUYA Game Controller
OUYA Game Controller"
So somehow it's registering no player 1 but instead a player 2 and a player 3?! I've never, ever paired/unpaired any of my OUYA controllers since their initial pairing so I don't understand why that would be.
I've been trying to get some help over at the GM forums too but so far nothing. Then again it's only been there a few hours, but I digress; the entire linchpin of my stuff's success rides on this.
So I've been trying to find some code that will allow me to just detect the first controller that is active, instead of forcing in that odd invisible non-controller.
I've found maybe about 6 or 7 scripts across the net, and none of them seem to function. The one I'm trying right now is courtesy of our own Eldon McGuinness, but he's long since abandoned GM so I've not been able to get anything from him.
Here's what I'm dealing with:
In a script called scr_controller
Code:
gp_count = gamepad_get_device_count();
controller = 0;
for (count = 0; count <= gp_count; count++)
{
if (gamepad_is_connected(count))
{
global.gp_connected[controller++] = count;
global.gp_count++;
}
}
if (global.gp_count < 1)
{
show_debug_message("No Controllers Connected");
}
else
{
show_debug_message(string(global.gp_count) + " Controllers Detected");
}
obj_controllertest (persistent)
Create
Code:
global.gp_count = 0
alarm[0] = 3;
Alarm 0
Player's character Create Event
Player's character Step Event
Code:
if gamepad_button_check(global.gp_connected[PLAYER_ID],gp_face1)
{if global.fire1=1
{instance_create(x+32,y+84,firep1)
global.fire1=0
}}
However, I'm getting an error when running this:
Code:
FATAL ERROR in
action number 1
of Step Event0
for object obj_p1:
Push :: Execution Error - Variable Get
-5.gp_connected(100003,0)
at gml_Object_obj_p1_Step_0
Bookmarks