1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
if (image_alpha >= 0.5) |
4 |
scr_enemy_attack_bullet_hitscr_enemy_attack_bullet_hitfunction 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 != -4)
{
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)
exit;
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)
exit;
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;
}
} (); |
5 |
if (bullet_hit_draw_timer > 0) |
6 |
bullet_hit_draw_timer -= 1; |
7 |
if (image_alpha < 1) |
8 |
{ |
9 |
if (global.hotland_flag[2] >= 2) |
10 |
image_alpha += 0.33; |
11 |
else |
12 |
image_alpha += 0.2; |
13 |
} |
14 |
else if (!destroy_self && fall_delay <= 0) |
15 |
{ |
16 |
gravity = 0.5; |
17 |
} |
18 |
else |
19 |
{ |
20 |
fall_delay--; |
21 |
} |
22 |
var battle_box = 3154; |
23 |
if (bullet_destroy_self && destroy_self < 1) |
24 |
{ |
25 |
vspeed = 0; |
26 |
destroy_type = 0; |
27 |
destroy_self = 1; |
28 |
} |
29 |
else if (bbox_bottom >= battle_box.bbox_bottom && destroy_self < 1) |
30 |
{ |
31 |
audio_play_sound(choose(snd_mart_impact_1, snd_mart_impact_2, snd_mart_impact_3), 1, 0); |
32 |
audio_play_sound(snd_ceroba_attack_bell_ring, 1, 0); |
33 |
vspeed = 0; |
34 |
destroy_type = 1; |
35 |
destroy_self = 1; |
36 |
} |
37 |
if (destroy_self == 1) |
38 |
{ |
39 |
hspeed = 0; |
40 |
gravity = 0; |
41 |
vspeed = 0; |
42 |
image_angle_rot = 0; |
43 |
image_index = 0; |
44 |
image_speed = 1; |
45 |
sprite_index = spr_ceroba_attack_bell_explosion; |
46 |
audio_play_sound(snd_ceroba_attack_bell_explode, 1, 0); |
47 |
destroy_self = 2; |
48 |
} |