pressed and released event with stick of gamepad

Freeflip

Member
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;

or

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

some idea?

Thanks
 

Yal

GMC Memer
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.
 
Top