G
Gunslito
Guest
Hi guys, I've a problem with my game.
I'm using this code on step event of btn_left:
(The sprites are drawn into the Draw Gui event)
when I press it "Birdie" walks to the left, but if I release the button it stills keep walking, the same happens with Jump, the object is coded like this:
If I maintain jump it'll jump higher, but when I use this on Android it keeps jumping all the time and the jumps are short, I need to press anywhere on the screen to cancel any button press.
I'm so sorry for my bad english
I'm using this code on step event of btn_left:
for(var i=0; i<4; i++)
{
if (device_mouse_check_button_pressed(i,mb_left) && position_meeting(device_mouse_x_to_gui(i),device_mouse_y_to_gui(i),btn_left))
{
Pressed=1
Image_index=1
Birdie.keyleft=-1
}
else Pressed=0;Image_index=0; Birdie.keyleft=0
}
{
if (device_mouse_check_button_pressed(i,mb_left) && position_meeting(device_mouse_x_to_gui(i),device_mouse_y_to_gui(i),btn_left))
{
Pressed=1
Image_index=1
Birdie.keyleft=-1
}
else Pressed=0;Image_index=0; Birdie.keyleft=0
}
when I press it "Birdie" walks to the left, but if I release the button it stills keep walking, the same happens with Jump, the object is coded like this:
If I maintain jump it'll jump higher, but when I use this on Android it keeps jumping all the time and the jumps are short, I need to press anywhere on the screen to cancel any button press.
I'm so sorry for my bad english