N
neryt
Guest
Hi I have problem withe the my player control. it is working but when i colide the wall and have
pressed Key W & Key A or Key W & Key S or Key S & Key A or Key S & Key D . player stop moving and i need relase one key to move . in Wall object i only mark as SOLID . if i make in physics it is working but rest of my stuff in game after physics is ON not working corect . If any one now how to make his work i will be very glad // I don't want to making this game in physics setings . Game movment is like Binding of Isac
thanks in advance
if (!gamepad_is_connected(0)) {
/// player movment
if (keyboard_check(ord("W"))) { sprite_index = s_player_up_1; direction = 90; y -= global.move_speed ; }
if (keyboard_check(ord("S"))) { sprite_index = s_player_down_1; direction = 270;y += global.move_speed ; }
if (keyboard_check(ord("A"))) { sprite_index = s_player_left_poprawione_bf_1; direction = 180 ;x -= global.move_speed ; }
if (keyboard_check(ord("D"))) { sprite_index = s_player_right_1; direction = 270 ;x += global.move_speed ; }
if (keyboard_check(ord("W"))) and (keyboard_check(ord("A"))) { global.move_speed = 5 ; }
else if (keyboard_check(ord("W"))) and (keyboard_check(ord("D"))) { global.move_speed = 5 ; }
else if (keyboard_check(ord("S"))) and (keyboard_check(ord("A"))) { global.move_speed = 5 ; }
else if (keyboard_check(ord("S"))) and (keyboard_check(ord("D"))) { global.move_speed = 5 ; }
else {global.move_speed = 5 ;}
}