1 |
if (hspeed > 0 && image_xscale < 0) |
2 |
image_xscale *= -1; |
3 |
if (hspeed < 0 && image_xscale > 0) |
4 |
image_xscale *= -1; |
5 |
if (instance_exists(parent)) |
6 |
{ |
7 |
finish = 0; |
8 |
if (parent.sider == 0) |
9 |
{ |
10 |
if (x < parent.x) |
11 |
finish = 1; |
12 |
} |
13 |
if (parent.sider == 1) |
14 |
{ |
15 |
if (x > parent.x) |
16 |
finish = 1; |
17 |
} |
18 |
sd = parent.sider; |
19 |
if (sd == 0 && distance_to_point(parent.x + 70, parent.y + 110) < 80) |
20 |
{ |
21 |
image_xscale *= 0.75; |
22 |
image_yscale *= 0.75; |
23 |
} |
24 |
if (sd == 1 && distance_to_point(parent.x - 70, parent.y + 110) < 80) |
25 |
{ |
26 |
image_xscale *= 0.75; |
27 |
image_yscale *= 0.75; |
28 |
} |
29 |
if (abs(image_xscale) <= 0.1) |
30 |
finish = 1; |
31 |
if (finish == 1) |
32 |
{ |
33 |
with (parent) |
34 |
event_user(3); |
35 |
instance_destroy(); |
36 |
} |
37 |
} |
38 |
else |
39 |
{ |
40 |
instance_destroy(); |
41 |
} |