1 |
if (attack_spray_state == 1) |
2 |
{ |
3 |
x += lengthdir_x(5, point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y)) |
4 |
y += lengthdir_y(5, point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y)) |
5 |
image_blend = c_white |
6 |
if (attack_flower_timer < attack_flower_timer_max) |
7 |
attack_flower_timer++ |
8 |
else |
9 |
{ |
10 |
image_blend = c_red |
11 |
audio_play_sound(snd_bullet_warning, 1, 0) |
12 |
attack_flower_timer = 0 |
13 |
attack_flower_beep_count -= 1 |
14 |
if (attack_flower_beep_count <= 0) |
15 |
attack_spray_state += 1 |
16 |
} |
17 |
return; |
18 |
} |
19 |
if (attack_spray_state == 2) |
20 |
{ |
21 |
instance_destroy() |
22 |
with (instance_create(x, y, obj_battle_enemy_attack_ceroba_opener_explosion)) |
23 |
ring_object = 2725 |
24 |
return; |
25 |
} |
26 |
if (image_alpha < 1) |
27 |
image_alpha += 0.1 |
28 |
else if (!alarm[0]) |
29 |
alarm[0] = 10alarm[0]if (attack_spray_state > 0)
return;
audio_play_sound(snd_enemy_bullet_shot, 1, 0)
for (var a = 0; a < array_length_1d(bullet_number); a++)
{
for (var i = 0; i < bullet_number[a]; i++)
{
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet)
var bullet_arc = (bullet_number[a] - 1) * bullet_spread / 2
bullet.speed = bullet_speed[a]
bullet.direction = (point_direction(x, y, 320, 320)) - bullet_arc + i * bullet_spread
}
}
alarm[0] = 16
image_xscale = 1.5
image_yscale = 1.5 |
30 |
if (image_xscale > 1) |
31 |
image_xscale -= 0.05 |
32 |
if (image_yscale > 1) |
33 |
image_yscale -= 0.05 |
34 |
switch current_position |
35 |
{ |
36 |
case 3: |
37 |
var xx = 320 |
38 |
var yy = 60 |
39 |
break |
40 |
case 2: |
41 |
xx = 440 |
42 |
yy = 110 |
43 |
break |
44 |
case 1: |
45 |
xx = 200 |
46 |
yy = 110 |
47 |
break |
48 |
} |
49 |
|
50 |
x = lerp(x, xx, 0.5) |
51 |
y = lerp(y, yy, 0.5) |
52 |
if (round(x) != xx || (round(y) != yy && alarm[0] > 0))alarm[0]if (attack_spray_state > 0)
return;
audio_play_sound(snd_enemy_bullet_shot, 1, 0)
for (var a = 0; a < array_length_1d(bullet_number); a++)
{
for (var i = 0; i < bullet_number[a]; i++)
{
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet)
var bullet_arc = (bullet_number[a] - 1) * bullet_spread / 2
bullet.speed = bullet_speed[a]
bullet.direction = (point_direction(x, y, 320, 320)) - bullet_arc + i * bullet_spread
}
}
alarm[0] = 16
image_xscale = 1.5
image_yscale = 1.5 |
53 |
alarm[0] = -1alarm[0]if (attack_spray_state > 0)
return;
audio_play_sound(snd_enemy_bullet_shot, 1, 0)
for (var a = 0; a < array_length_1d(bullet_number); a++)
{
for (var i = 0; i < bullet_number[a]; i++)
{
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet)
var bullet_arc = (bullet_number[a] - 1) * bullet_spread / 2
bullet.speed = bullet_speed[a]
bullet.direction = (point_direction(x, y, 320, 320)) - bullet_arc + i * bullet_spread
}
}
alarm[0] = 16
image_xscale = 1.5
image_yscale = 1.5 |
54 |
else if (!alarm[0]) |
55 |
alarm[0] = 1alarm[0]if (attack_spray_state > 0)
return;
audio_play_sound(snd_enemy_bullet_shot, 1, 0)
for (var a = 0; a < array_length_1d(bullet_number); a++)
{
for (var i = 0; i < bullet_number[a]; i++)
{
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet)
var bullet_arc = (bullet_number[a] - 1) * bullet_spread / 2
bullet.speed = bullet_speed[a]
bullet.direction = (point_direction(x, y, 320, 320)) - bullet_arc + i * bullet_spread
}
}
alarm[0] = 16
image_xscale = 1.5
image_yscale = 1.5 |