Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_ceroba_phase_2_p1_circling_lantern_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (!fade_out)
4
{
5
    if (image_alpha < 1)
6
        image_alpha += 0.1;
7
    else if (!alarm[0])
8
        alarm[0] = 30;
gml_Object_obj_ceroba_phase_2_p1_circling_lantern_Alarm_0.gml

if (live_call()) return global.live_result; var bullet_number = 1; var bullet_spawn_timer = 22; var wave_spawn_timer = bullet_spawn_timer * 3; var bullet_speed = 5; var bullet_offset = 20; var soul = 2979; bullet_spawn_direction = point_direction(x, y, soul.x, soul.y); var fireball = instance_create_depth(x, y, depth + 1, obj_ceroba_attack_fireball); fireball.direction = bullet_spawn_direction; fireball.speed = bullet_speed; image_xscale = 1.5; image_yscale = 1.5; alarm[0] = bullet_spawn_timer;
9
}
10
else if (image_alpha > 0)
11
{
12
    image_alpha -= 0.1;
13
}
14
else
15
{
16
    instance_destroy();
17
}
18
scr_enemy_attack_bullet_hit
scr_enemy_attack_bullet_hit

function 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; } }
();
19
if (bullet_destroy_self)
20
{
21
    instance_destroy();
22
    instance_create_depth(x, y, depth, obj_ceroba_attack_fire_mask_destroy_large);
23
}
24
image_xscale = lerp(image_xscale, 1, 0.15);
25
image_yscale = image_xscale;
26
x = attack_target_x + lengthdir_x(attack_distance, attack_dir);
27
y = attack_target_y + lengthdir_y(attack_distance, attack_dir);
28
if (image_alpha < 1 && can_move == false)
29
{
30
    image_alpha += 0.2;
31
    if (image_alpha > 1)
32
        image_alpha = 1;
33
}
34
if (attack_dir < 360)
35
    attack_dir += bullet_speed;
36
else
37
    attack_dir = bullet_speed;