The title pretty much says it all. I want my players to be able to assign custom gamepad buttons for the controls. So imagine you click on 'jump' and a message says 'press the key for jump', after which you press that key, the game remembers which one it was and you can use the new setting from then on. Posted on September 5, 2013 by Jibran Syed Tagged 2D GameMaker GML Comments15 Comments on Game Maker: Gradually rotating an object towards a target Game Maker: Gradually rotating an object towards a target.
EDIT: I want to rephrase my question so it makes more sense. A good example is my menu system. If I press and hold down on the dpad, it works fine because my code says (gamepad_button_check_pressed(0,gp_padd)) and it just moves down one slot. However if I hold down on my left analog stick, the select cursor goes nuts moving down each menu item rapid fire because it's checking for if I'm holding down each frame - my current code for this is (gamepad_axis_value(0,gp_axislv) < 0) - Is there a way to make the analog stick behave as if it's a button_check_pressed?
I'm adding gamepad support and I was wondering if there's a way to check if an analog stick has been 'pressed' vs just holding it down, like there are for other keys, for instance (gamepad_button_check_pressed(0,gp_padd)); I ask because I have platforms that I want the character to be able to jump down through by pressing down on the stick, but if they're holding down when they jump on it I don't want them to just pass through, if that makes sense.
I figure I could make a 'analogpressed' variable that turns on when the stick is pressed and then immediately off based on a timer, but just wondered if there was a more elegant solution. Thanks.