1 |
if live_call() |
2 |
return global.live_result; |
3 |
if (instance_exists(obj_ceroba_attack_bullet_spawner_spawner) && obj_ceroba_attack_bullet_spawner_spawner.attack_stop == true) |
4 |
fade_out = true |
5 |
if (!fade_out) |
6 |
{ |
7 |
if (image_alpha < 1) |
8 |
{ |
9 |
image_alpha += 0.1 |
10 |
if (global.hotland_flag[2] >= 2) |
11 |
image_alpha += 0.1 |
12 |
} |
13 |
else |
14 |
{ |
15 |
hspeed = lerp(hspeed, hspeed_target, 0.15) |
16 |
if ((hspeed < 0 && x <= x_target) || (hspeed > 0 && x >= x_target)) |
17 |
fade_out = true |
18 |
if (!alarm[0]) |
19 |
alarm[0] = 10alarm[0]if live_call()
return global.live_result;
if (instance_exists(obj_ceroba_attack_bullet_spawner_spawner) && obj_ceroba_attack_bullet_spawner_spawner.attack_stop == true)
return;
var bullet_number = 6
var bullet_spawn_timer = 12
var bullet_speed = 4
if (global.hotland_flag[2] == 2)
{
bullet_number = 6
bullet_spawn_timer = 10
}
if (global.hotland_flag[2] == 3)
{
bullet_number = 6
bullet_spawn_timer = 8
}
for (var i = bullet_spawn_direction; i < (360 + bullet_spawn_direction); i += (360 / bullet_number))
{
var fireball = instance_create_depth(x, y, (depth + 1), obj_ceroba_attack_fireball)
ds_list_add(fireball_list, fireball)
fireball.direction = i
fireball.speed = bullet_speed
}
bullet_spawn_direction += bullet_spawn_direction_inc
image_xscale = 1.5
image_yscale = 1.5
alarm[0] = bullet_spawn_timer |
20 |
} |
21 |
} |
22 |
else if (image_alpha > 0) |
23 |
{ |
24 |
for (var i = 0; i < ds_list_size(fireball_list); i++) |
25 |
{ |
26 |
var bullet = ds_list_find_value(fireball_list, i) |
27 |
bullet.image_alpha = image_alpha |
28 |
} |
29 |
image_alpha -= 0.1 |
30 |
} |
31 |
else |
32 |
instance_destroy() |
33 |
for (i = 0; i < ds_list_size(fireball_list); i++) |
34 |
{ |
35 |
bullet = ds_list_find_value(fireball_list, i) |
36 |
bullet.x += hspeed |
37 |
} |
38 |
scr_enemy_attack_bullet_hitscr_enemy_attack_bullet_hitfunction scr_enemy_attack_bullet_hit() //gml_Script_scr_enemy_attack_bullet_hit
{
if live_call()
return global.live_result;
if variable_instance_exists(id, "bullet_hit_draw_timer")
{
if (bullet_hit_draw_timer > 0)
bullet_hit_draw_timer -= 1
}
var collider_id = instance_place(x, y, obj_heart_yellow_shot)
if (collider_id != noone)
{
var collider_object_index = collider_id.object_index
instance_create_depth(collider_id.x, collider_id.bbox_top, -999, obj_heart_yellow_shot_destroy)
if (collider_object_index == 690)
{
if (object_index == obj_ceroba_phase_2_bell)
instance_destroy(collider_id)
if (variable_instance_exists(id, "collider_id_last") && collider_id_last == collider_id)
return;
if (collider_object_index == 690)
collider_id_last = collider_id
}
else if (collider_object_index == 2561)
{
if (variable_instance_exists(id, "collider_id_last") && collider_id_last == collider_id)
return;
collider_id_last = collider_id
}
else if ((!(variable_instance_exists(id, "collider_id_last"))) || collider_id != collider_id_last)
{
collider_id.alarm[0] = 1
collider_id.image_alpha = 0
collider_id_last = collider_id
}
audio_play_sound(snd_arc_hit, 0.1, 0)
if variable_instance_exists(id, "bullet_hit_points")
{
bullet_hit_draw_timer = 5
if (collider_object_index == 690)
bullet_hit_points -= 3
else
bullet_hit_points -= 1
if (bullet_hit_points <= 0)
bullet_destroy_self = true
}
return true;
}
} () |
39 |
if bullet_destroy_self |
40 |
{ |
41 |
instance_destroy() |
42 |
instance_create_depth(x, y, depth, obj_ceroba_attack_fire_mask_destroy_large) |
43 |
} |
44 |
image_xscale = lerp(image_xscale, 1, 0.15) |
45 |
image_yscale = image_xscale |