D
Deleted member 13992
Guest
Hi all,
I'm trying to get my Dualshock 4 to work in GMS2. I did a bit of searching, and have followed this blog post on async. Plugged it into my game, and it detects my old Logitech (on directinput) just fine. Controls work too, when I assign gp_id to the rest of my game. I get the debug messages I'd expect unplugging and plugging the Logitech back in. Great!
Async - System in one of my control objects:
No luck with the Dualshock 4 however. No detection/undetected message, nothing.
This DS4 works fine for everything else I use it for outside of GMS2. Other games, no problem. This site detects it just fine as well.
I also tried the "non proper" way by manually going through ids 0-11, game still doesn't detect the DS4.
Any ideas?
I could use my Logitech for gamedev and my DS4 for everything else, but that's not a realistic solution at all, when it comes to finishing the game. Also I use it with USB, not BT.
I'm trying to get my Dualshock 4 to work in GMS2. I did a bit of searching, and have followed this blog post on async. Plugged it into my game, and it detects my old Logitech (on directinput) just fine. Controls work too, when I assign gp_id to the rest of my game. I get the debug messages I'd expect unplugging and plugging the Logitech back in. Great!
Async - System in one of my control objects:
GML:
show_debug_message("Event = " + async_load[? "event_type"]); // Debug code so you can see which event has been
show_debug_message("Pad = " + string(async_load[? "pad_index"])); // triggered and the pad associated with it.
switch(async_load[? "event_type"]) // Parse the async_load map to see which event has been triggered
{
case "gamepad discovered": // A game pad has been discovered
var pad = async_load[? "pad_index"]; // Get the pad index value from the async_load map
gamepad_set_axis_deadzone(pad, 0.5); // Set the "deadzone" for the axis
gamepad_set_button_threshold(pad, 0.1); // Set the "threshold" for the triggers
gp_id = pad;
show_debug_message("FOUND!");
break;
case "gamepad lost": // Gamepad has been removed or otherwise disabled
var pad = async_load[? "pad_index"]; // Get the pad index
show_debug_message("NOT FOUND");
break;
}
No luck with the Dualshock 4 however. No detection/undetected message, nothing.
This DS4 works fine for everything else I use it for outside of GMS2. Other games, no problem. This site detects it just fine as well.
I also tried the "non proper" way by manually going through ids 0-11, game still doesn't detect the DS4.
Any ideas?
I could use my Logitech for gamedev and my DS4 for everything else, but that's not a realistic solution at all, when it comes to finishing the game. Also I use it with USB, not BT.