Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// @description Insert description here
- if(keyboard_check(ord("D"))) {
- x+= walkSpeed;
- image_speed = walkSpeed / 3;
- sprite_index = spr_player_right;
- if (x == xprevious && y == yprevious){image_speed = 0;}
- }
- if(keyboard_check(ord("A"))) {
- x-= walkSpeed;
- image_speed = walkSpeed / 3;
- sprite_index = spr_player_left;
- if (x == xprevious && y == yprevious){image_speed = 0;}
- }
- if(keyboard_check(ord("W"))) {
- y-= walkSpeed;
- image_speed = walkSpeed / 3;
- sprite_index = spr_player_up;
- if (x == xprevious && y == yprevious){sprite_index = 0;}
- }
- if(keyboard_check(ord("S"))) {
- y+= walkSpeed;
- image_speed = walkSpeed / 3;
- sprite_index = spr_player_down;
- if (x == xprevious && y == yprevious){image_speed = 0;}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement