Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. snapToGrid()
  2. print(position)
  3. print(chosenTarget.position)
  4.  
  5. var ang = position.angle_to_point(chosenTarget.position)*(180/PI)
  6. if ang < 0:
  7. ang = 360 + ang
  8.  
  9.  
  10. print(ang)
  11. match ang:
  12. 0:
  13. aState = AITURNEND
  14. 90:
  15. aState = AITURNEND
  16. 180:
  17. aState = AITURNEND
  18. 270:
  19. aState = AITURNEND
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement