1 |
if (!instance_exists(obj_heart_battle_fighting_parent)) |
2 |
exit; |
3 |
if (rope_damaged == true) |
4 |
{ |
5 |
rope_damaged = false; |
6 |
rope_overlay_alpha = 1.5; |
7 |
audio_play_sound(snd_starlo_rope_shot, 1, 0); |
8 |
if (instance_exists(obj_battle_enemy_attack_starlo_take_aim_one_checker)) |
9 |
{ |
10 |
with (obj_battle_enemy_attack_starlo_take_aim_one_checker) |
11 |
starlo_take_aim_rope_hit = true; |
12 |
instance_create(x, y, obj_battle_enemy_attack_starlo_rope_particles); |
13 |
} |
14 |
if (instance_exists(obj_battle_enemy_attack_starlo_take_aim_checker)) |
15 |
{ |
16 |
with (obj_battle_enemy_attack_starlo_take_aim_checker) |
17 |
starlo_take_aim_rope_hit = true; |
18 |
instance_destroy(); |
19 |
instance_create(x, y, obj_battle_enemy_attack_starlo_rope_particles); |
20 |
} |
21 |
} |
22 |
var soul_distance = point_distance(x, y, obj_heart_battle_fighting_red.x, obj_heart_battle_fighting_red.y); |
23 |
if (soul_distance > 28 && rope_strain_noloop == false) |
24 |
{ |
25 |
audio_play_sound(snd_starlo_rope_strain, 1, 0); |
26 |
rope_strain_noloop = true; |
27 |
} |
28 |
else if (rope_strain_noloop == true && soul_distance < 20) |
29 |
{ |
30 |
rope_strain_noloop = false; |
31 |
} |
32 |
rope_overlay_alpha = lerp(rope_overlay_alpha, 0, 0.15); |
33 |
rope_soul_overlay_alpha = lerp(rope_soul_overlay_alpha, 0, 0.2); |
34 |
if (rope_soul_overlay_alpha < 0.1) |
35 |
rope_soul_overlay_alpha = 0; |