• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

pressed and released event with stick of gamepad


Hi, with the stick of gamepad, how can I simulate the pressed and released event?

for example:
k_left_p = keyboard_check_pressed(vk_left) or gamepad_button_check_pressed(0, gp_padl) or PUT CODE HERE;


k_left_r = keyboard_check_released(vk_left) or gamepad_button_check_released(0, gp_padl) or PUT CODE HERE;

some idea?



šŸ§ *penguin noises*
GMC Elder
Have additional variables to store the button's state each step. Before updating the state, check if the button is pressed but wasn't the previous step - that's a Pressed event. On the other hand, if it's pressed the previous step but isn't pressed down this step, that's a Released event.