With this easy-to-use asset package, all you have to do is add it to your project, set up a couple of inputs, and BOOM! you're done! :D
Supports
Functions
input_add(input_name, keyboard_or_mouse, gamepad);
input_get(device, input_name);
input_get_pressed(device, input_name);
input_get_released(device, input_name);
input_change(input_name, new_keyboard_or_mouse, new_gamepad )
mouse_get_xprevious();
mouse_get_yprevious();
Global variables
mouse_xprevious;
mouse_yprevious;
Once you have the package downloaded the only script you will need to modify / add to is the INPUT_SETUP script. This is where you will define your inputs using the script input_add( input_name (string), keyboard_or_mouse_button, gamepad_button )
Example
INPUT_SETUP script
input_add("ui_left", vk_left, gp_axisL_left);
input_add("ui_right", vk_right, gp_axisL_right);
input_add("ui_jump, vk_space, gp_axisL_up);
Step event
var _left = input_get(0, "ui_left");
var _right = input_get(0, "ui_right");
var _jump = input_get_pressed(0, "ui_up");
if ( _jump ) {
vspeed = -12;
}
x += ( _right - _left ) * 4;
End User Licence Agreement (EULA).