1 |
if live_call() |
2 |
return global.live_result; |
3 |
var particles_spawn = false |
4 |
item_offset = 15 |
5 |
switch scene |
6 |
{ |
7 |
case 0: |
8 |
with (obj_martlet_final_base) |
9 |
{ |
10 |
image_angle = 0 |
11 |
y = lerp(y, other.y_target, 0.25) |
12 |
x = lerp(x, other.x_target, 0.25) |
13 |
if (abs(y - other.y_target) < 1 && abs(x - other.x_target) < 1) |
14 |
{ |
15 |
x = other.x_target |
16 |
y = other.y_target |
17 |
other.scene++ |
18 |
image_speed = 1 |
19 |
} |
20 |
} |
21 |
break |
22 |
case 1: |
23 |
if (flap_noloop == false) |
24 |
{ |
25 |
if (obj_martlet_final_base.image_index >= 2) |
26 |
{ |
27 |
particles_spawn = true |
28 |
var flap_sound = audio_play_sound(snd_mart_flap, 20, 0) |
29 |
audio_sound_pitch(flap_sound, 0.8) |
30 |
flap_noloop = true |
31 |
} |
32 |
} |
33 |
else if (obj_martlet_final_base.image_index < 2) |
34 |
flap_noloop = false |
35 |
attack_duration-- |
36 |
if (attack_duration <= 0) |
37 |
{ |
38 |
alarm[0] = 0 |
39 |
audio_stop_sound(snd_mart_flap) |
40 |
scene++ |
41 |
} |
42 |
break |
43 |
case 2: |
44 |
with (obj_martlet_final_base) |
45 |
{ |
46 |
y = lerp(y, other.y_original, 0.25) |
47 |
x = lerp(x, other.x_original, 0.25) |
48 |
if (abs(y - other.y_original) < 1 && abs(x - other.x_original) < 1) |
49 |
{ |
50 |
x = other.x_original |
51 |
y = other.y_original |
52 |
martlet_sprites_reset = true |
53 |
instance_destroy(other) |
54 |
} |
55 |
} |
56 |
break |
57 |
} |
58 |
|
59 |
if (floor(obj_martlet_final_base.image_index) >= 3 && floor(obj_martlet_final_base.image_index) <= 6) |
60 |
{ |
61 |
with (obj_heart_battle_fighting_parent) |
62 |
vsp_factor = 11 |
63 |
} |
64 |
else |
65 |
{ |
66 |
with (obj_heart_battle_fighting_parent) |
67 |
vsp_factor = 0 |
68 |
} |
69 |
if particles_spawn |
70 |
{ |
71 |
var inc = 22.857142857142858 |
72 |
for (var i = 0; i < 7; i++) |
73 |
{ |
74 |
var xx = 250 + i * inc |
75 |
var yy = 270 + (sign(i % 2)) * 20 + (random_range(-10, 10)) |
76 |
part_particles_create(global.ps, xx, yy, global.pt_Effect1, 1) |
77 |
part_particles_create(global.ps, xx, (yy - 60 + (random_range(-10, 10))), global.pt_Effect1, 1) |
78 |
} |
79 |
} |