Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_enemy_timer_attacks_sousborg

(view raw script w/o annotations or w/e)
1
function scr_enemy_timer_attacks_sousborg
scr_enemy_timer_attacks_sousborg

function scr_enemy_timer_attacks_sousborg() { var enemy_attack = global.enemy_attack; if (instance_exists(obj_dialogue_box_battle_transformation_any) && obj_heart_battle_fighting_parent.moveable == true) { if (global.enemy_sparing) { with (obj_dialogue_box_battle_transformation_any) event_user(0); exit; } if (enemy_attack == "Egg Crack" && !instance_exists(obj_battle_enemy_attack_sousborg_egg_generator)) instance_create_depth(0, 0, obj_heart_battle_fighting_parent.depth - 1, obj_battle_enemy_attack_sousborg_egg_generator); else if (enemy_attack == "Egg Boil" && !instance_exists(obj_battle_enemy_attack_sousborg_egg_boil_generator)) instance_create_depth(0, 0, obj_heart_battle_fighting_parent.depth - 1, obj_battle_enemy_attack_sousborg_egg_boil_generator); else if (enemy_attack == "Sousborg Season" && !instance_exists(obj_battle_enemy_attack_sousborg_season_generator)) instance_create_depth(0, 0, obj_heart_battle_fighting_parent.depth - 1, obj_battle_enemy_attack_sousborg_season_generator); else if (enemy_attack == "Sousborg Flip" && !instance_exists(obj_battle_enemy_attack_sousborg_flip_generator)) instance_create_depth(0, 0, obj_heart_battle_fighting_parent.depth - 1, obj_battle_enemy_attack_sousborg_flip_generator); } }
()
2
{
3
    var enemy_attack = global.enemy_attack;
4
    if (instance_exists(obj_dialogue_box_battle_transformation_any) && obj_heart_battle_fighting_parent.moveable == true)
5
    {
6
        if (global.enemy_sparing)
7
        {
8
            with (obj_dialogue_box_battle_transformation_any)
9
                event_user(0);
10
            exit;
11
        }
12
        if (enemy_attack == "Egg Crack" && !instance_exists(obj_battle_enemy_attack_sousborg_egg_generator))
13
            instance_create_depth(0, 0, obj_heart_battle_fighting_parent.depth - 1, obj_battle_enemy_attack_sousborg_egg_generator);
14
        else if (enemy_attack == "Egg Boil" && !instance_exists(obj_battle_enemy_attack_sousborg_egg_boil_generator))
15
            instance_create_depth(0, 0, obj_heart_battle_fighting_parent.depth - 1, obj_battle_enemy_attack_sousborg_egg_boil_generator);
16
        else if (enemy_attack == "Sousborg Season" && !instance_exists(obj_battle_enemy_attack_sousborg_season_generator))
17
            instance_create_depth(0, 0, obj_heart_battle_fighting_parent.depth - 1, obj_battle_enemy_attack_sousborg_season_generator);
18
        else if (enemy_attack == "Sousborg Flip" && !instance_exists(obj_battle_enemy_attack_sousborg_flip_generator))
19
            instance_create_depth(0, 0, obj_heart_battle_fighting_parent.depth - 1, obj_battle_enemy_attack_sousborg_flip_generator);
20
    }
21
}