if keyboard_check(ord('A')) x-=2.8
if keyboard_check(ord('D')) x+=2.8
if keyboard_check(ord('W')) y-=2.8
if keyboard_check(ord('S')) y+=2.8
if (keyboard_check(ord('W')) && keyboard_check(ord('D')))
{
sprite_index = walksp_upright
}
else
if (keyboard_check(ord('W')))
{
sprite_index = walksp_up
}
if (keyboard_check(ord('A')))
{
sprite_index = walksp_left
}
if (keyboard_check(ord('D')))
{
sprite_index = walksp_right
}
if (keyboard_check(ord('S')))
{
sprite_index = walksp_down
}etc.My problem is that if both W and D are pressed it doesnt change to walksp_upright. How do I fix this?
Also, how do I make it so if the object isn't walking it changes the sprite back to standsp_1?
Thanks!











