Created
July 23, 2018 00:58
-
-
Save PoppyWorks/c2b73b3e12d0ad1ffb99f677344b7698 to your computer and use it in GitHub Desktop.
GML Script for changing the color of a DS4 gamepad. Will likely only function on PS4. Will return true upon completion of the color change.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///gamepad_color(device,color,time) | |
var device = argument0; | |
var color = argument1; | |
var time = argument2; //(use something like .01) | |
if color != global.gpColor | |
{ | |
var led = merge_color(global.gpColor,color,global.gpColorFader) | |
global.gpColorFader += time; | |
gamepad_set_color(device,led) | |
if global.gpColorFader >= 1 | |
{ | |
alert("Gamepad Color finished",0) | |
global.gpColorFader = 0; | |
global.gpColor = color; | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment