código:
Código: Selecionar todos
if (keyboard_check(vk_up) && keyboard_check(vk_right))
{x+=2; y-=2; sprite_index=spr_man_up_right_walk;}
else if (keyboard_check(vk_up) && keyboard_check(vk_left))
{x-=2; y-=2; sprite_index=spr_man_up_left_walk;}
else if (keyboard_check(vk_down) && keyboard_check(vk_right))
{x+=2; y+=2; sprite_index=spr_man_down_right_walk;}
else if (keyboard_check(vk_down) && keyboard_check(vk_left))
{x-=2; y+=2; sprite_index=spr_man_down_left_walk;}
else if keyboard_check(vk_up)
{x+=0; y-=4; sprite_index=spr_herowalkcima;}
else if keyboard_check(vk_left)
{x-=4; y-=0; sprite_index=spr_heroleftwalk;}
else if keyboard_check(vk_down)
{x+=0; y+=4; sprite_index=spr_herodownwalk;}
else if keyboard_check(vk_right)
{x+=4; y-=0; sprite_index=spr_herorightwalk;}
uso o Game Maker 8 PRO