Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_phase_2_shield_bells_attack_Alarm_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (!instance_exists(obj_ceroba_phase_2_shield))
4
    return;
5
var shot_offset = 6
6
var wave_offset = 15
7
var bullet_number = 5
8
var bullet_speed = 6
9
var spawn_dir = bullet_spawn_direction
10
if (current_bell == noone)
11
{
12
    bullet_spawn_direction = irandom_range(0, 360)
13
    do
14
    {
15
        current_bell = instance_find(obj_ceroba_phase_2_bell, irandom(instance_number(obj_ceroba_phase_2_bell) - 1))
16
    } until (current_bell != last_bell || instance_number(obj_ceroba_phase_2_bell) <= 1);
17
    last_bell = current_bell
18
}
19
if instance_exists(current_bell)
20
{
21
    with (current_bell)
22
    {
23
        for (var i = spawn_dir; i < (360 + spawn_dir); i += (360 / bullet_number))
24
        {
25
            var fireball = instance_create_depth(x, y, (depth + 1), obj_ceroba_attack_fireball)
26
            fireball.direction = i
27
            fireball.speed = bullet_speed
28
        }
29
        image_xscale = 1.5
30
        image_yscale = 1.5
31
    }
32
}
33
else
34
{
35
    alarm[0] = wave_offset
alarm[0]

if live_call() return global.live_result; if (!instance_exists(obj_ceroba_phase_2_shield)) return; var shot_offset = 6 var wave_offset = 15 var bullet_number = 5 var bullet_speed = 6 var spawn_dir = bullet_spawn_direction if (current_bell == noone) { bullet_spawn_direction = irandom_range(0, 360) do { current_bell = instance_find(obj_ceroba_phase_2_bell, irandom(instance_number(obj_ceroba_phase_2_bell) - 1)) } until (current_bell != last_bell || instance_number(obj_ceroba_phase_2_bell) <= 1); last_bell = current_bell } if instance_exists(current_bell) { with (current_bell) { for (var i = spawn_dir; i < (360 + spawn_dir); i += (360 / bullet_number)) { var fireball = instance_create_depth(x, y, (depth + 1), obj_ceroba_attack_fireball) fireball.direction = i fireball.speed = bullet_speed } image_xscale = 1.5 image_yscale = 1.5 } } else { alarm[0] = wave_offset current_bell = noone shot_count = shot_count_max return; } if (shot_count > 1) { alarm[0] = shot_offset shot_count -= 1 bullet_spawn_direction += bullet_spawn_direction_inc } else { alarm[0] = wave_offset current_bell = -4 shot_count = shot_count_max }
36
    current_bell = noone
37
    shot_count = shot_count_max
38
    return;
39
}
40
if (shot_count > 1)
41
{
42
    alarm[0] = shot_offset
alarm[0]

if live_call() return global.live_result; if (!instance_exists(obj_ceroba_phase_2_shield)) return; var shot_offset = 6 var wave_offset = 15 var bullet_number = 5 var bullet_speed = 6 var spawn_dir = bullet_spawn_direction if (current_bell == noone) { bullet_spawn_direction = irandom_range(0, 360) do { current_bell = instance_find(obj_ceroba_phase_2_bell, irandom(instance_number(obj_ceroba_phase_2_bell) - 1)) } until (current_bell != last_bell || instance_number(obj_ceroba_phase_2_bell) <= 1); last_bell = current_bell } if instance_exists(current_bell) { with (current_bell) { for (var i = spawn_dir; i < (360 + spawn_dir); i += (360 / bullet_number)) { var fireball = instance_create_depth(x, y, (depth + 1), obj_ceroba_attack_fireball) fireball.direction = i fireball.speed = bullet_speed } image_xscale = 1.5 image_yscale = 1.5 } } else { alarm[0] = wave_offset current_bell = noone shot_count = shot_count_max return; } if (shot_count > 1) { alarm[0] = shot_offset shot_count -= 1 bullet_spawn_direction += bullet_spawn_direction_inc } else { alarm[0] = wave_offset current_bell = -4 shot_count = shot_count_max }
43
    shot_count -= 1
44
    bullet_spawn_direction += bullet_spawn_direction_inc
45
}
46
else
47
{
48
    alarm[0] = wave_offset
alarm[0]

if live_call() return global.live_result; if (!instance_exists(obj_ceroba_phase_2_shield)) return; var shot_offset = 6 var wave_offset = 15 var bullet_number = 5 var bullet_speed = 6 var spawn_dir = bullet_spawn_direction if (current_bell == noone) { bullet_spawn_direction = irandom_range(0, 360) do { current_bell = instance_find(obj_ceroba_phase_2_bell, irandom(instance_number(obj_ceroba_phase_2_bell) - 1)) } until (current_bell != last_bell || instance_number(obj_ceroba_phase_2_bell) <= 1); last_bell = current_bell } if instance_exists(current_bell) { with (current_bell) { for (var i = spawn_dir; i < (360 + spawn_dir); i += (360 / bullet_number)) { var fireball = instance_create_depth(x, y, (depth + 1), obj_ceroba_attack_fireball) fireball.direction = i fireball.speed = bullet_speed } image_xscale = 1.5 image_yscale = 1.5 } } else { alarm[0] = wave_offset current_bell = noone shot_count = shot_count_max return; } if (shot_count > 1) { alarm[0] = shot_offset shot_count -= 1 bullet_spawn_direction += bullet_spawn_direction_inc } else { alarm[0] = wave_offset current_bell = -4 shot_count = shot_count_max }
49
    current_bell = -4
50
    shot_count = shot_count_max
51
}