Skip to content

Instantly share code, notes, and snippets.

@PoppyWorks
Created August 13, 2018 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PoppyWorks/0799391e4e59cedb8f8f812f550be515 to your computer and use it in GitHub Desktop.
Save PoppyWorks/0799391e4e59cedb8f8f812f550be515 to your computer and use it in GitHub Desktop.
GML Script. Checks to see if the device number (argument0) was interacted with at all. Used in input_change() to know to swap inputs!
///gamepad_button_check_any(device)
device = argument0;
for ( var i = gp_face1; i < gp_axisrv; i++ )
{
if ( gamepad_button_check(device , i ) ) return i;
}
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment