Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. //PUT THIS PART IN THE CREATE FUNCTION
  2. move_speed = 5;
  3.  
  4.  
  5. //PUT THIS INSTEAD OF THE CURRENT MOVE FUNCTION
  6. if(x < Flag.x)
  7. {
  8. x += move_speed;
  9. }
  10. else if(x > Flag.x)
  11. {
  12. x -= move_speed;
  13. }
  14. if(y < Flag.y)
  15. {
  16. y += move_speed;
  17. }
  18. else if(y > Flag.y)
  19. {
  20. y -= move_speed;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement