InputMan is a simple and easy to use script to map your keyboard and controllers for upto 4 players.
Example of how to use iman_add
iman_add("left", player_id,ord("A"), IMAN_LEFT_STICK_LEFT); iman_add("right", player_id,ord("D"), IMAN_LEFT_STICK_RIGHT); iman_add("jump", player_id, vk_space, IMAN_BTN_A); iman_add("fire", player_id,vk_lcontrol, IMAN_BTN_X);
Now check if the key is down or pressed
move_left = iman_down("left", player_id); move_right = iman_down("right", player_id); jump = iman_pressed("jump", player_id); jump_held = iman_down("jump", player_id); fire = iman_pressed("fire", player_id); fire_held = iman_down("fire", player_id);
player_id here is 0 to 3 - mapped to four constants for ease of use - IMAN_P1, IMAN_P2, IMAN_P3, IMAN_P4
Apart from these 4 core functions, there are over 70 functions which let you directly access states and values of each button on the gamepad both analog and digital. Please check the attached pdf for full documentation.
Version 1.0.1. Published March 25, 2016
Created with GameMaker: Studio v1.4.1749
This asset hasn't received enough reviews yet.
You can only review assets you've bought.
No reviews have been left for this asset - be the first!