Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_start_enemy_attacking_guardener

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

function scr_start_enemy_attacking_guardener() { instance_create(319, 320, obj_dialogue_box_battle_transformation_any); instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + ((obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2)), round(obj_dialogue_box_battle_transformation_any.bbox_top + ((obj_dialogue_box_battle_transformation_any.bbox_bottom - obj_dialogue_box_battle_transformation_any.bbox_top) / 2)), obj_heart_battle_fighting_red); if (global.turns_passed >= 0) { if (global.route == 2 && global.turns_passed == 10 && global.enemy_mode == 1) { instance_create(0, 0, obj_steamworks_29_in_battle_cutscene_3); } else if (global.enemy_mode < 2) { instance_create(402, 68, obj_quote_bubble_battle_yellow_2); instance_create(0, 0, obj_quote_battle_guardener); } else if (global.enemy_mode == 2) { obj_heart_battle_fighting_red.moveable = true; } } else { obj_heart_battle_fighting_red.image_alpha = 0; } }
()
2
{
3
    instance_create(319, 320, obj_dialogue_box_battle_transformation_any);
4
    instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + ((obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2)), round(obj_dialogue_box_battle_transformation_any.bbox_top + ((obj_dialogue_box_battle_transformation_any.bbox_bottom - obj_dialogue_box_battle_transformation_any.bbox_top) / 2)), obj_heart_battle_fighting_red);
5
    if (global.turns_passed >= 0)
6
    {
7
        if (global.route == 2 && global.turns_passed == 10 && global.enemy_mode == 1)
8
        {
9
            instance_create(0, 0, obj_steamworks_29_in_battle_cutscene_3);
10
        }
11
        else if (global.enemy_mode < 2)
12
        {
13
            instance_create(402, 68, obj_quote_bubble_battle_yellow_2);
14
            instance_create(0, 0, obj_quote_battle_guardener);
15
        }
16
        else if (global.enemy_mode == 2)
17
        {
18
            obj_heart_battle_fighting_red.moveable = true;
19
        }
20
    }
21
    else
22
    {
23
        obj_heart_battle_fighting_red.image_alpha = 0;
24
    }
25
}