Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_phase_2_attack_spawner_Other_11

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (created_spawner != 0)
4
    created_spawner.attack_stop = true;
5
var list_pos = irandom_range(0, ds_list_size(attack_list) - 1);
6
var attack_choice = ds_list_find_value(attack_list, list_pos);
7
var attack_index;
8
do
9
{
10
    attack_index = ds_list_find_index(attack_list, attack_choice);
11
    ds_list_delete(attack_list, attack_index);
12
}
13
until (attack_index == -1);
14
switch (attack_choice)
15
{
16
    case 0:
17
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_p2_spawner_mask);
18
        attack_duration = 100;
19
        break;
20
    case 1:
21
        created_spawner = instance_create_depth(0, 0, 0, obj_ceroba_attack_bullet_spawner_spawner);
22
        attack_duration = 100;
23
        break;
24
    case 2:
25
        created_spawner = instance_create_depth(0, 0, -100, obj_battle_enemy_attack_ceroba_phase_2_bell_spawner);
26
        attack_duration = 100;
27
        break;
28
    case 3:
29
        created_spawner = instance_create_depth(0, 0, 0, obj_ceroba_attack_fire_pillar_spawner);
30
        attack_duration = 40;
31
        break;
32
    case 4:
33
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_flower_circle_full_checker);
34
        attack_duration = 80;
35
        break;
36
    case 5:
37
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_diamond_attack_phase2_spawner);
38
        created_spawner.alarm[0] = 10;
39
        attack_duration = 20;
40
        break;
41
    case 6:
42
        created_spawner = instance_create_depth(battle_box.x, battle_box.y, -100, obj_battle_enemy_attack_ceroba_phase_2_p2_rope_circle);
43
        attack_duration = 60;
44
        break;
45
    case 7:
46
        created_spawner = instance_create_depth(0, 0, -100, obj_battle_enemy_attack_ceroba_phase_2_mask);
47
        attack_duration = 140;
48
        break;
49
    case 8:
50
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_p2_circling_lanterns);
51
        attack_duration = 100;
52
        break;
53
    case 9:
54
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_p2_obstacle_spawner);
55
        attack_duration = 120;
56
        break;
57
}
58
if (modifier_enabled == 1 && modifier_noloop == false)
59
{
60
    modifier_noloop = true;
61
    if (modifier_attack == 1)
62
        instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_black_hole_checker);
63
    if (modifier_attack == 2)
64
        instance_create_depth(battle_box.x, battle_box.y, -100, obj_battle_enemy_attack_ceroba_phase_2_p2_rope_circle);
65
}
66
show_debug_message("Spawning" + string(attack_choice));
67
alarm[0] = attack_duration;
gml_Object_obj_battle_enemy_attack_ceroba_phase_2_attack_spawner_Alarm_0.gml

if (live_call()) return global.live_result; event_user(1);