1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
var heart = obj_heart_battle_fighting_parent; |
4 |
if (image_alpha <= 1) |
5 |
image_alpha += 0.2; |
6 |
if (image_index >= 11 && move_noloop == false && warn_timer == -1) |
7 |
{ |
8 |
direction = point_direction(x, y, heart.x, heart.y); |
9 |
speed = move_speed; |
10 |
image_speed = 0; |
11 |
image_xscale = 1.5; |
12 |
image_yscale = 1.5; |
13 |
hold_timer = 7; |
14 |
move_noloop = true; |
15 |
} |
16 |
if (warn_timer > 0) |
17 |
{ |
18 |
warn_timer--; |
19 |
} |
20 |
else if (warn_timer != -1) |
21 |
{ |
22 |
if (!warn_flash) |
23 |
{ |
24 |
warn_timer = 3; |
25 |
warn_flash = true; |
26 |
audio_play_sound(snd_bullet_warning, 1, 0); |
27 |
image_blend = c_red; |
28 |
} |
29 |
else |
30 |
{ |
31 |
move_noloop = false; |
32 |
warn_timer = -1; |
33 |
image_blend = c_white; |
34 |
} |
35 |
} |
36 |
if (hold_timer > 0) |
37 |
hold_timer--; |
38 |
else |
39 |
image_speed = image_speed_base; |
40 |
if (speed > 0) |
41 |
speed -= 0.5; |
42 |
else |
43 |
speed = 0; |
44 |
if (image_xscale > 1.05) |
45 |
image_xscale = lerp(image_xscale, 1, 0.15); |
46 |
else |
47 |
image_xscale = 1; |
48 |
image_yscale = image_xscale; |