1 |
if live_call() |
2 |
return global.live_result; |
3 |
var battle_box = obj_dialogue_box_battle_transformation_any |
4 |
if (image_alpha < 1) |
5 |
image_alpha += 0.2 |
6 |
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;
}
} () |
7 |
if bullet_destroy_self |
8 |
{ |
9 |
instance_destroy() |
10 |
instance_create_depth(x, y, (depth - 1), obj_fmartlet_star_destroy) |
11 |
audio_play_sound(snd_rock_break, 1, 0) |
12 |
obj_fmartlet_star_destroy.sprite_index = destroy_sprite |
13 |
if (object_index != obj_fmartlet_meteor_small) |
14 |
{ |
15 |
for (var i = 0; i < 2; i++) |
16 |
{ |
17 |
var meteor = instance_create_depth(x, y, -105, obj_fmartlet_meteor_small) |
18 |
meteor.vspeed = -6 |
19 |
meteor.hspeed = -3 + i * 6 |
20 |
} |
21 |
} |
22 |
} |
23 |
if ((bbox_bottom + vspeed) > battle_box.bbox_bottom && bbox_left > battle_box.bbox_left && bbox_right < battle_box.bbox_right) |
24 |
{ |
25 |
scr_screenshake_battlescr_screenshake_battlefunction scr_screenshake_battle() //gml_Script_scr_screenshake_battle
{
instance_destroy(obj_screenshake_battle)
var screenshake = instance_create(0, 0, obj_screenshake_battle)
battle_screenshake_duration = argument[0]
battle_screenshake_intensity = argument[1]
battle_screenshake_dec = battle_screenshake_intensity / battle_screenshake_duration
} (1, 1) |
26 |
audio_play_sound(snd_rock_break, 1, 0) |
27 |
instance_create_depth(x, y, (depth - 1), obj_fmartlet_star_destroy) |
28 |
instance_create_depth(x, y, -100, obj_fmartlet_star_explosion_hurt) |
29 |
instance_destroy() |
30 |
} |
31 |
part_emitter_region(global.ps_meteors, self_emitter, (x - 2), (x + 2), (y - 2), (y + 2), 0, 0) |
32 |
part_emitter_stream(global.ps_meteors, self_emitter, global.pt_trail, 2) |