Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if direction >= 45 && direction < 135
- {
- back = true
- }
- else
- {
- back = false
- }
- if direction >= 135 && direction < 225
- {
- left = true
- }
- else
- {
- left = false
- }
- if direction >= 225 && direction < 315
- {
- forward = true
- }
- else
- {
- forward = false
- }
- if direction >= 315 && direction < 45
- {
- right = true
- }
- else
- {
- right = false
- }
- if mouse_check_button_pressed(mb_left)
- {
- movetox = mouse_x
- movetoy = mouse_y
- moving = true
- }
- speed = 3
- direction = point_direction(x,y,movetox,movetoy)
- speed = min(3,point_distance(x,y,movetox,movetoy)/2)
- if speed < 0.1
- {
- speed = 0
- moving = false
- }
Add Comment
Please, Sign In to add comment