Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_pillars_Alarm_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var battle_box = obj_dialogue_box_battle_transformation_any
4
var list_pos = irandom_range(0, (ds_list_size(bullet_list) - 1))
5
var bul_spawn = ds_list_find_value(bullet_list, list_pos)
6
ds_list_delete(bullet_list, list_pos)
7
switch bul_spawn
8
{
9
    case "middle":
10
        var bullet = instance_create_depth(battle_box.x, battle_box.bbox_bottom, -110, obj_battle_enemy_attack_bullet_1)
11
        bullet.attack_delay = 1
12
        with (bullet)
13
        {
14
            target_x = battle_box.x
15
            target_y = 500
16
            turn_rate = 0
17
        }
18
        break
19
    case "left":
20
        bullet = instance_create_depth((battle_box.x + spawn_dist), battle_box.bbox_bottom, -110, obj_battle_enemy_attack_bullet_1)
21
        bullet.attack_delay = 1
22
        with (bullet)
23
        {
24
            target_x = battle_box.bbox_left - 50
25
            target_y = 200
26
            turn_rate = 0.07
27
        }
28
        break
29
    case "right":
30
        bullet = instance_create_depth((battle_box.x - spawn_dist), battle_box.bbox_bottom, -110, obj_battle_enemy_attack_bullet_1)
31
        bullet.image_xscale = -1
32
        bullet.attack_delay = 1
33
        with (bullet)
34
        {
35
            target_x = battle_box.bbox_right + 50
36
            target_y = 200
37
            turn_rate = 0.07
38
        }
39
        break
40
}
41
42
if (ds_list_size(bullet_list) > 0)
43
{
44
}
45
else if (wave_number > 0)
46
{
47
    ds_list_add(bullet_list, "left", "right")
48
    wave_number -= 1
49
}
50
else
51
    alarm[1] = 180
alarm[1]

if live_call() return global.live_result; instance_destroy()