Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- image_index = 0 //Makes Player face right
- if place_free(x + 5 + sprint,y) //Check if place (to move to) is free
- then
- {
- x = x + 5 + sprint //Moves player to free space
- }
- else
- {
- if place_free(x + 1 + sprint,y) //Checks closer place (only after first check failes)
- then
- {
- x = x + 1 + sprint //Moves player to -closer- free space
- }
- else
- {
- if place_free(x + 1,y) //Checks if minimum space is free (1Pixel)
- then
- {
- x = x + 1 //Moves player minimumly (1Pixel
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement