1 | if (distance_to_point(point_x2, point_y2) < move_speed) |
2 | { |
3 | x = point_x2 |
4 | y = point_y2 |
5 | } |
6 | if (x == point_x2 && y == point_y2 && no_loop == false) |
7 | { |
8 | alarm[0] = 2 |
9 | no_loop = true |
10 | } |
11 | if (no_loop == false) |
12 | { |
13 | x += lengthdir_x(move_speed, angle) |
14 | y += lengthdir_y(move_speed, angle) |
15 | } |