Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. /// @description Insert description here
  2.  
  3. if(keyboard_check(ord("D"))) {
  4. x+= walkSpeed;
  5. image_speed = walkSpeed / 3;
  6. sprite_index = spr_player_right;
  7. if (x == xprevious && y == yprevious){image_speed = 0;}
  8. }
  9. if(keyboard_check(ord("A"))) {
  10. x-= walkSpeed;
  11. image_speed = walkSpeed / 3;
  12. sprite_index = spr_player_left;
  13. if (x == xprevious && y == yprevious){image_speed = 0;}
  14. }
  15. if(keyboard_check(ord("W"))) {
  16. y-= walkSpeed;
  17. image_speed = walkSpeed / 3;
  18. sprite_index = spr_player_up;
  19. if (x == xprevious && y == yprevious){sprite_index = 0;}
  20. }
  21. if(keyboard_check(ord("S"))) {
  22. y+= walkSpeed;
  23. image_speed = walkSpeed / 3;
  24. sprite_index = spr_player_down;
  25. if (x == xprevious && y == yprevious){image_speed = 0;}
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement