F
filipe
Guest
i need help with creating player movement that can turn around in a full circle and move forward in
the right direction.
i have try to do this but the turning around function and moving forward function cause the player not to move
right
here's the code
create event
step event
A-key event
D-key
release A-key
release D-key
and here's a gif
https://gyazo.com/84d78e8645f9a18c9fb3de1b2dc8087e
as you kinda of see the movement is messed up
the right direction.
i have try to do this but the turning around function and moving forward function cause the player not to move
right
here's the code
create event
Code:
image_speed = 0;
Code:
if keyboard_check(vk_up)
{
image_angle+=5
if image_angle = 180
x -=3;
}
if keyboard_check(vk_down)
{
image_angle-=5
if image_angle = 180
x +=3;
}
Code:
if keyboard_check(ord('A'))
{
image_index = 4;
y +=3;
}
if keyboard_check(vk_left)
{
y -=3;
}
Code:
if keyboard_check(ord('B'))
{
image_index = 1;
y +=3;
}
if keyboard_check(vk_right)
{
y +=3;
}
Code:
image_index = 3;
Code:
image_index = 1;
https://gyazo.com/84d78e8645f9a18c9fb3de1b2dc8087e
as you kinda of see the movement is messed up