1 |
event_inherited() |
2 |
if live_call() |
3 |
return global.live_result; |
4 |
if (image_alpha < 1) |
5 |
image_alpha += 0.2 |
6 |
if (hp_self <= 0) |
7 |
{ |
8 |
instance_create(x, y, obj_flowey_battle_phase_2_lowpoly_stickbug_dead) |
9 |
instance_destroy() |
10 |
} |
11 |
if (collision_rectangle(bbox_left, (y + 20), bbox_right, (y + 60), obj_heart_battle_fighting_parent, false, false) && attack_noloop == false) |
12 |
{ |
13 |
vspeed = 0 |
14 |
sprite_index = spr_battle_flowey_lowpoly_stickbug_swipe |
15 |
image_index = 0 |
16 |
attack_noloop = true |
17 |
} |
18 |
if (sprite_index == spr_battle_flowey_lowpoly_stickbug_swipe) |
19 |
{ |
20 |
switch charge_state |
21 |
{ |
22 |
case 0: |
23 |
vspeed = -0.5 |
24 |
if (image_index >= 15) |
25 |
charge_state++ |
26 |
break |
27 |
case 1: |
28 |
vspeed += 1 |
29 |
if (vspeed > 6) |
30 |
vspeed = 6 |
31 |
if (image_index >= 28) |
32 |
charge_state++ |
33 |
break |
34 |
case 2: |
35 |
vspeed = lerp(vspeed, 0, 0.2) |
36 |
if (image_index >= (image_number - 1)) |
37 |
sprite_index = spr_battle_flowey_lowpoly_stickbug_crawl |
38 |
break |
39 |
} |
40 |
|
41 |
} |
42 |
else |
43 |
vspeed = lerp(vspeed, 2, 0.1) |
44 |
if (y > 700) |
45 |
instance_destroy() |