1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
if (image_xscale > 1) |
4 |
image_xscale -= 0.05; |
5 |
if (image_yscale > 1) |
6 |
image_yscale -= 0.05; |
7 |
if (fade_out == true) |
8 |
{ |
9 |
image_alpha -= 0.1; |
10 |
if (image_alpha <= 0) |
11 |
instance_destroy(); |
12 |
exit; |
13 |
} |
14 |
if (image_alpha < 1) |
15 |
{ |
16 |
image_alpha += 0.1; |
17 |
exit; |
18 |
} |
19 |
var xx = x; |
20 |
var yy = y; |
21 |
if (can_move) |
22 |
{ |
23 |
switch (current_position) |
24 |
{ |
25 |
case 1: |
26 |
xx = 320; |
27 |
yy = 120; |
28 |
break; |
29 |
case 2: |
30 |
xx = 400; |
31 |
yy = 150; |
32 |
break; |
33 |
case 3: |
34 |
xx = 240; |
35 |
yy = 150; |
36 |
break; |
37 |
} |
38 |
x = lerp(x, xx, 0.5); |
39 |
y = lerp(y, yy, 0.5); |
40 |
} |
41 |
if (x != xx || (y != yy && (alarm[0] > 0 || alarm[3] > 0)))gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_pacifist_Alarm_3.gmlif (live_call())
return global.live_result;
audio_play_sound(snd_enemy_bullet_shot, 1, 0);
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet);
bullet.speed = bullet_speed_alt;
bullet.direction = point_direction(x, y, 320, 320) + bullet_spread_alt;
if (bullet_spread_inc == true)
{
if (bullet_spread_alt < bullet_spread_alt_max)
{
bullet_spread_alt += bullet_spread_amount;
}
else
{
bullet_spread_inc = false;
bullet_spread_alt -= (bullet_spread_amount / 2);
}
}
else if (bullet_spread_alt > (-bullet_spread_alt_max - (bullet_spread_amount / 2)))
{
bullet_spread_alt -= bullet_spread_amount;
}
else
{
bullet_spread_inc = true;
bullet_spread_alt += (bullet_spread_amount / 2);
}
alarm[3] = 2;
image_xscale = 1.5;
image_yscale = 1.5; |
42 |
{ |
43 |
alarm[0] = -1;gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_pacifist_Alarm_0.gmlif (live_call())
return global.live_result;
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, target_x, target_y) - bullet_arc) + (i * bullet_spread);
}
}
if (bullet_count > 0)
{
alarm[0] = 20;
bullet_count -= 1;
}
else
{
fade_out = true;
}
image_xscale = 1.5;
image_yscale = 1.5; |
44 |
alarm[3] = -1;gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_pacifist_Alarm_3.gmlif (live_call())
return global.live_result;
audio_play_sound(snd_enemy_bullet_shot, 1, 0);
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet);
bullet.speed = bullet_speed_alt;
bullet.direction = point_direction(x, y, 320, 320) + bullet_spread_alt;
if (bullet_spread_inc == true)
{
if (bullet_spread_alt < bullet_spread_alt_max)
{
bullet_spread_alt += bullet_spread_amount;
}
else
{
bullet_spread_inc = false;
bullet_spread_alt -= (bullet_spread_amount / 2);
}
}
else if (bullet_spread_alt > (-bullet_spread_alt_max - (bullet_spread_amount / 2)))
{
bullet_spread_alt -= bullet_spread_amount;
}
else
{
bullet_spread_inc = true;
bullet_spread_alt += (bullet_spread_amount / 2);
}
alarm[3] = 2;
image_xscale = 1.5;
image_yscale = 1.5; |
45 |
} |
46 |
else if (!alarm[0] && !alarm[3]) |
47 |
{ |
48 |
bullet_pattern_current = 1; |
49 |
if (bullet_pattern_current == 1 && !alarm[0]) |
50 |
alarm[0] = 1;gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_pacifist_Alarm_0.gmlif (live_call())
return global.live_result;
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, target_x, target_y) - bullet_arc) + (i * bullet_spread);
}
}
if (bullet_count > 0)
{
alarm[0] = 20;
bullet_count -= 1;
}
else
{
fade_out = true;
}
image_xscale = 1.5;
image_yscale = 1.5; |
51 |
if (bullet_pattern_current == 2 && !alarm[3]) |
52 |
alarm[3] = 1;gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_pacifist_Alarm_3.gmlif (live_call())
return global.live_result;
audio_play_sound(snd_enemy_bullet_shot, 1, 0);
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet);
bullet.speed = bullet_speed_alt;
bullet.direction = point_direction(x, y, 320, 320) + bullet_spread_alt;
if (bullet_spread_inc == true)
{
if (bullet_spread_alt < bullet_spread_alt_max)
{
bullet_spread_alt += bullet_spread_amount;
}
else
{
bullet_spread_inc = false;
bullet_spread_alt -= (bullet_spread_amount / 2);
}
}
else if (bullet_spread_alt > (-bullet_spread_alt_max - (bullet_spread_amount / 2)))
{
bullet_spread_alt -= bullet_spread_amount;
}
else
{
bullet_spread_inc = true;
bullet_spread_alt += (bullet_spread_amount / 2);
}
alarm[3] = 2;
image_xscale = 1.5;
image_yscale = 1.5; |
53 |
} |