Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_determine_can_display_enemy_hp_ui

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

function scr_determine_can_display_enemy_hp_ui() { hp_ui_alpha_1 = 1; hp_ui_alpha_2 = 1; hp_ui_alpha_3 = 1; var game_mode = global.game_mode; var enemy_count = global.enemy_count; var battle_enemy_name = global.battle_enemy_name; if (global.game_mode == "customs") { switch (battle_enemy_name) { default: } } else if (global.game_mode == "yellow") { switch (battle_enemy_name) { case "dummy training pacifist": hp_ui_alpha_1 = 0; break; default: } } if (enemy_count >= 2) { battle_enemy_name = global.battle_enemy_name_2; if (global.game_mode == "customs") { switch (battle_enemy_name) { default: } } else if (global.game_mode == "yellow") { switch (battle_enemy_name) { default: } } } if (enemy_count >= 3) { battle_enemy_name = global.battle_enemy_name_3; if (global.game_mode == "customs") { switch (battle_enemy_name) { default: } } else if (global.game_mode == "yellow") { switch (battle_enemy_name) { default: } } } if (instance_exists(obj_battle_hp_current_enemy)) { with (obj_battle_hp_current_enemy) image_alpha = obj_heart_battle_menu.hp_ui_alpha_1; with (obj_battle_hp_max_enemy) image_alpha = obj_heart_battle_menu.hp_ui_alpha_1; } if (instance_exists(obj_battle_hp_current_enemy_2)) { with (obj_battle_hp_current_enemy_2) image_alpha = obj_heart_battle_menu.hp_ui_alpha_2; with (obj_battle_hp_max_enemy_2) image_alpha = obj_heart_battle_menu.hp_ui_alpha_2; } if (instance_exists(obj_battle_hp_current_enemy_3)) { with (obj_battle_hp_current_enemy_3) image_alpha = obj_heart_battle_menu.hp_ui_alpha_3; with (obj_battle_hp_max_enemy_3) image_alpha = obj_heart_battle_menu.hp_ui_alpha_3; } }
()
2
{
3
    hp_ui_alpha_1 = 1;
4
    hp_ui_alpha_2 = 1;
5
    hp_ui_alpha_3 = 1;
6
    var game_mode = global.game_mode;
7
    var enemy_count = global.enemy_count;
8
    var battle_enemy_name = global.battle_enemy_name;
9
    if (global.game_mode == "customs")
10
    {
11
        switch (battle_enemy_name)
12
        {
13
            default:
14
        }
15
    }
16
    else if (global.game_mode == "yellow")
17
    {
18
        switch (battle_enemy_name)
19
        {
20
            case "dummy training pacifist":
21
                hp_ui_alpha_1 = 0;
22
                break;
23
            default:
24
        }
25
    }
26
    if (enemy_count >= 2)
27
    {
28
        battle_enemy_name = global.battle_enemy_name_2;
29
        if (global.game_mode == "customs")
30
        {
31
            switch (battle_enemy_name)
32
            {
33
                default:
34
            }
35
        }
36
        else if (global.game_mode == "yellow")
37
        {
38
            switch (battle_enemy_name)
39
            {
40
                default:
41
            }
42
        }
43
    }
44
    if (enemy_count >= 3)
45
    {
46
        battle_enemy_name = global.battle_enemy_name_3;
47
        if (global.game_mode == "customs")
48
        {
49
            switch (battle_enemy_name)
50
            {
51
                default:
52
            }
53
        }
54
        else if (global.game_mode == "yellow")
55
        {
56
            switch (battle_enemy_name)
57
            {
58
                default:
59
            }
60
        }
61
    }
62
    if (instance_exists(obj_battle_hp_current_enemy))
63
    {
64
        with (obj_battle_hp_current_enemy)
65
            image_alpha = obj_heart_battle_menu.hp_ui_alpha_1;
66
        with (obj_battle_hp_max_enemy)
67
            image_alpha = obj_heart_battle_menu.hp_ui_alpha_1;
68
    }
69
    if (instance_exists(obj_battle_hp_current_enemy_2))
70
    {
71
        with (obj_battle_hp_current_enemy_2)
72
            image_alpha = obj_heart_battle_menu.hp_ui_alpha_2;
73
        with (obj_battle_hp_max_enemy_2)
74
            image_alpha = obj_heart_battle_menu.hp_ui_alpha_2;
75
    }
76
    if (instance_exists(obj_battle_hp_current_enemy_3))
77
    {
78
        with (obj_battle_hp_current_enemy_3)
79
            image_alpha = obj_heart_battle_menu.hp_ui_alpha_3;
80
        with (obj_battle_hp_max_enemy_3)
81
            image_alpha = obj_heart_battle_menu.hp_ui_alpha_3;
82
    }
83
}