Advertisement
Guest User

Untitled

a guest
Nov 28th, 2015
835
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. image_index = 0 //Makes Player face right
  2. if place_free(x + 5 + sprint,y) //Check if place (to move to) is free
  3. then
  4. {
  5. x = x + 5 + sprint //Moves player to free space
  6. }
  7. else
  8. {
  9. if place_free(x + 1 + sprint,y) //Checks closer place (only after first check failes)
  10. then
  11. {
  12. x = x + 1 + sprint //Moves player to -closer- free space
  13. }
  14. else
  15. {
  16. if place_free(x + 1,y) //Checks if minimum space is free (1Pixel)
  17. then
  18. {
  19. x = x + 1 //Moves player minimumly (1Pixel
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement