1 |
image_alpha += 0.05; |
2 |
image_angle -= rotspeed; |
3 |
if (rotspeed > 0) |
4 |
rotspeed -= 2; |
5 |
if (rotspeed == 0 && speed < 1) |
6 |
{ |
7 |
timer += 1; |
8 |
if (timer == 5) |
9 |
{ |
10 |
speed = 8; |
11 |
friction = -0.3; |
12 |
direction = image_angle; |
13 |
image_angle = direction; |
14 |
} |
15 |
} |
16 |
if (fade == 1 && speed >= 7) |
17 |
{ |
18 |
timer += 1; |
19 |
if (timer >= 22) |
20 |
deactivate = 1; |
21 |
} |
22 |
xoff = lengthdir_x(25, direction); |
23 |
yoff = lengthdir_y(25, direction); |
24 |
if (rotspeed == 0 && deactivate == 0) |
25 |
{ |
26 |
if (collision_line(x - (xoff / 2), y - (yoff / 2), x + xoff, y + yoff, obj_heart, true, false)) |
27 |
{ |
28 |
if (global.hp > 1) |
29 |
{ |
30 |
scr_damagestandard_x(); |
31 |
if (global.hp <= 0) |
32 |
global.hp = 1; |
33 |
} |
34 |
else |
35 |
{ |
36 |
global.hp = 0; |
37 |
} |
38 |
} |
39 |
} |
40 |
if (deactivate == 1) |
41 |
{ |
42 |
image_alpha -= 0.25; |
43 |
if (image_alpha <= 0) |
44 |
instance_destroy(); |
45 |
} |
46 |
if (global.turntimer < 1) |
47 |
instance_destroy(); |