Slyddar
Member
I'm playing around with various controllers in a game that has coop, and noticed in the documentation, specifically this
Sidenote, some bad English in there. It was taken from https://docs2.yoyogames.com/source/_build/3_scripting/4_gml_reference/controls/gamepad input/index.html
So in my testing I have an Xbox and PS4 controller connected, and as noted above, when the game loses focus the PS4 player drops out completely. Gaining focus again the player rejoins.
I'm currently testing using this check to not remove it if the game loses focus
which seems ok, but if the controller is disconnected while focus is lost, this may go south without further checks on reconnection.
I'm curious if others have experienced this and have you implemented any workarounds, or even have suggestions how to handle this dropout. It's obviously quite bad if the player has items, or health, etc, as everything gets lost.
"Also note that the Direct Input interface is run in cooperative mode which means that your game only has access when it is the foreground application, which in turn will cause Direct Input controllers to be "lost" if the game uses focus and then "found" again when it comes back into focus (this can be detected in the System Event and dealt with)."
Sidenote, some bad English in there. It was taken from https://docs2.yoyogames.com/source/_build/3_scripting/4_gml_reference/controls/gamepad input/index.html
So in my testing I have an Xbox and PS4 controller connected, and as noted above, when the game loses focus the PS4 player drops out completely. Gaining focus again the player rejoins.
I'm currently testing using this check to not remove it if the game loses focus
Code:
if !os_is_paused()
I'm curious if others have experienced this and have you implemented any workarounds, or even have suggestions how to handle this dropout. It's obviously quite bad if the player has items, or health, etc, as everything gets lost.
Last edited: