0
0bzidien
Guest
Hi all, i'm having an issue that is beyond my (almost 0) experience with Gamemaker.
im trying to code movement using GML. It works perfectly except for moving left and right. but when i run up or down my character runs diagonally instead of along the y axis. If I remove the sprite animation the character moves correctly. Thanks for any help
im trying to code movement using GML. It works perfectly except for moving left and right. but when i run up or down my character runs diagonally instead of along the y axis. If I remove the sprite animation the character moves correctly. Thanks for any help
if keyboard_check(ord("W"))
y -= 1
if keyboard_check(vk_shift) and keyboard_check(ord("W"))
y -= 2
if keyboard_check(vk_shift) and keyboard_check(ord("W"))
{
sprite_index = Jennifer_run_up
speed = 1
}
else
if keyboard_check(ord("W"))
{
sprite_index = Jennifer_walk_up
speed = 1
}
y -= 1
if keyboard_check(vk_shift) and keyboard_check(ord("W"))
y -= 2
if keyboard_check(vk_shift) and keyboard_check(ord("W"))
{
sprite_index = Jennifer_run_up
speed = 1
}
else
if keyboard_check(ord("W"))
{
sprite_index = Jennifer_walk_up
speed = 1
}