F
footlegchicken
Guest
i want it so if i press right and my player goes right then i press left but still holding right i want my player to continue walking right.
same for left
this is my code
also i want sonic to stay in his right sprite if walking right
if keyboard_check(vk_right) {
x += 4;
sprite_index = spr_sdsonic_jog_right
image_speed = 0.3;
}
if keyboard_check(vk_left) {
x -= 4;
sprite_index = spr_sdsonic_jog_left
image_speed = 0.3;
}
if keyboard_check_released(vk_right) {
sprite_index = spr_sdsonic_idle_right
image_speed = 0.3;
}
if keyboard_check_released(vk_left) {
sprite_index = spr_sdsonic_idle_left
image_speed = 0.3;
}
same for left
this is my code
also i want sonic to stay in his right sprite if walking right
if keyboard_check(vk_right) {
x += 4;
sprite_index = spr_sdsonic_jog_right
image_speed = 0.3;
}
if keyboard_check(vk_left) {
x -= 4;
sprite_index = spr_sdsonic_jog_left
image_speed = 0.3;
}
if keyboard_check_released(vk_right) {
sprite_index = spr_sdsonic_idle_right
image_speed = 0.3;
}
if keyboard_check_released(vk_left) {
sprite_index = spr_sdsonic_idle_left
image_speed = 0.3;
}