1 |
event_inherited(); |
2 |
if (hp_self <= 0) |
3 |
{ |
4 |
if (jump_noloop == false) |
5 |
{ |
6 |
path_end(); |
7 |
audio_play_sound(snd_monster_damage_hit_critical, 1, 0); |
8 |
jump_noloop = true; |
9 |
vspeed = 4; |
10 |
gravity = 0.5; |
11 |
image_speed = 0; |
12 |
} |
13 |
image_alpha -= 0.04; |
14 |
if (image_alpha <= 0) |
15 |
instance_destroy(); |
16 |
} |
17 |
if (live_call()) |
18 |
return global.live_result; |
19 |
switch (path_index) |
20 |
{ |
21 |
case pt_flowey_battle_phase_2_paper_right: |
22 |
image_angle = direction + 90; |
23 |
break; |
24 |
case pt_flowey_battle_phase_2_paper_right_top: |
25 |
image_angle = direction - 90; |
26 |
break; |
27 |
case pt_flowey_battle_phase_2_paper_left: |
28 |
image_angle = direction - 90; |
29 |
break; |
30 |
case pt_flowey_battle_phase_2_paper_left_top: |
31 |
image_angle = direction + 90; |
32 |
break; |
33 |
} |
34 |
path_speed = 4; |
35 |
if (path_position > 0.5) |
36 |
{ |
37 |
with (obj_flowey_battle_phase_2_paper_thorn) |
38 |
{ |
39 |
if (path_index == other.path_index) |
40 |
{ |
41 |
if (path_position > 0.9) |
42 |
{ |
43 |
var old_pos = other.path_position; |
44 |
other.path_position = path_position; |
45 |
path_position = old_pos; |
46 |
} |
47 |
} |
48 |
} |
49 |
} |