|device||Which gamepad device "slot" to check.|
|button||Which gamepad button constant to check for.|
With this function you can get the current value of an analogue
button, from 0 to 1, where 0 is no pressure and 1 is full
speed = gamepad_button_value(0, gp_shoulderrb) * 4;
The above code uses the analogue trigger value from the gamepad plugged into device "slot" 0 to set the speed of the instance.