A downloadable tool

Buy Now$3.99 USD or more

A script pack that contains many input related scripts for Gamemaker Studio 2. No more setting up alarms or timer variables to check if keys or buttons have been double tapped or held down; just call the scripts and you're done! Contains the following:

//Gamepads

• draw_gamepad_slots - Draws the status of all slots available for a gamepad as well as whether or not a gamepad is connected to that slot. Intended for debugging purposes.

• gamepad_axis_check_angle -  Returns the exact angle an axis of a gamepad is being pushed towards.

• gamepad_axis_check_flicked - Returns whether or not an axis on a gamepad was 'flicked' in a given direction.

• gamepad_axis_check_pushed - Returns whether or not an axis was pushed in a given direction. Works similarly to keyboard_check_pressed(), the script will only return true on the frame the player pushed the stick.

• gamepad_axis_check_rotated - Returns whether or not an axis on a gamepad was rotated within a given amount of time. You can check if the axis was rotated either clockwise or counter-clockwise.

• gamepad_axis_check_tilted - Returns whether or not a axis is being 'tilted' in a given direction. A tilt means the stick is not being fully pushed in the checked direction; you choose the maximum amount the player can push the stick before it should no longer be considered a tilt.

• gamepad_axis_raw_value - Returns the raw input value an axis is being pushed in. Used for getting the raw value after setting the deadzone of a gamepad slot with 'gamepad_set_axis_deadzone()'.

• gamepad_button_check_any - Returns whether or not any button on a gamepad is/was pressed or held. You can also check if any axis' are being pushed in any direction past their deadzone.

• gamepad_button_check_held - Returns whether or not a button on a gamepad was held for a given amount of time.

• gamepad_button_check_pressed_ext - Returns whether or not a button on a gamepad was pressed a given amount of times with a given amount of time.

• gamepad_check_inputs - Returns whether or not a list of inputs on a gamepad was made in order, within a given amount of time.

//Keyboard

•  draw_keys_held -  Draws all keyboard keys that are currently being held down (expect for a few like FN, prntscrn, etc). Intended use is for debugging purposes. Can also be used to see the maximum amount of keys that can be held down at once on a given keyboard device.

• keyboard_check_pressed_ext - Returns whether or not a key on a keyboard has been pressed a given amount of times within a given amount of time.

• keyboard_check_held - Returns whether or not a key on a keyboard has been held for a given amount of time.

• keyboard_check_inputs - Returns whether or not a list of keys on a keyboard was pressed in order, within a given amount of time.

•  keyboard_check_keys_held - Returns whether or not a given list of keys are being held down.

• keyboard_check_multiple - Allows you to check whether or not multiple specific keys are being held down. It will only return true on the exact frame that all the checked for keys are held down.

• keyboard_check_pressed_ext - Allows you to check whether or not a specific key has been pressed a number of times within a given amount of time.

• keyboard_check_typeable_char - Returns whether or not a typeable character has been pressed or is being held (your choice), and returns that character as a string.

//Mouse

• display_mouse_get_x_speed - Returns the speed that the mouse cursor is moving at on the x-axis, relative to the display.

• display_mouse_get_y_speed - Returns the speed that the mouse cursor is moving at on the y-axis, relative to the display.

• make_gui_element_draggable - Makes a GUI element that is being drawn on screen by the calling instance draggable by the mouse.

• make_self_draggable - Makes the calling instance able to be dragged by the mouse.

• mouse_check_button_held - Returns whether or not a mouse button has been held for a given amount of time

• mouse_check_button_pressed_ext - Returns whether or not a mouse button has been pressed a given amount of times within a given amount of time.

• mouse_is_within_window - Returns whether or not the mouse is within the game window.

• mouse_over_gui_element - Returns whether or not the mouse is over a drawn GUI element.

• mouse_over_instance - Returns whether or not the mouse is over an instance.

• room_mouse_get_x_speed - Returns the speed that the mouse cursor is moving at on the x-axis, relative to the game room.

• room_mouse_get_y_speed - Returns the speed that the mouse cursor is moving at on the y-axis, relative to the game room.

• window_mouse_get_x_speed - Returns the speed that the mouse cursor is moving at on the x-axis, relative to the game window.

• window_mouse_get_y_speed - Returns the speed that the mouse cursor is moving at on the y-axis, relative to the game window.

Purchase

Buy Now$3.99 USD or more

In order to download this tool you must purchase it at or above the minimum price of $3.99 USD. You will get access to the following files:

MaxLos' Input Script Pack.yymps 354 kB

Comments

Log in with itch.io to leave a comment.

Hi, is it possible to get the angle of a gamepad axis?

(3 edits)

Hello, yes it is possible! It never occurred to me to add such a function to the script pack, but I have now thanks your comment! I'll be updating it later today with the script 

Great to hear! Looking forward to seeing your solution

I've updated it with the script :) But if that's the only script you need for whatever you're working on, I wouldn't want you paying for this since it's relatively simple to do:

var haxis = gamepad_axis_value(0, gp_axislh );
var vaxis = gamepad_axis_value(0, gp_axislv);

var angle = point_direction(0, 0, haxis, vaxis);

That would get you the angle of the left stick in just 3 lines of code. The only difference between doing it like this and how I did it in my script pack is in my script pack I make sure to take the controller's deadzone in consideration when getting the angle, because if you don't it changes the return value slightly

(+1)

Great thanks! I already purchased your script and will check it out