Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_heart_battle_menu_act_Create_0

(view raw script w/o annotations or w/e)
1
image_speed = 0
2
image_index = 0
3
if instance_exists(obj_text_battle_move_selected_enemy_name_parent)
4
{
5
    for (counter = 0; counter < 2; counter += 1)
6
    {
7
        if (global.act_number == 1 && (!instance_exists(obj_text_battle_move_selected_enemy_name)))
8
            global.act_number = 2
9
        if (global.act_number == 2 && (!instance_exists(obj_text_battle_move_selected_enemy_name_2)))
10
            global.act_number = 1
11
        if (global.act_number == 1 && (!instance_exists(obj_text_battle_move_selected_enemy_name)))
12
            global.act_number = 3
13
        if (global.act_number == 3 && (!instance_exists(obj_text_battle_move_selected_enemy_name_3)))
14
            global.act_number = 1
15
    }
16
}
17
if instance_exists(obj_text_battle_move_selected_enemy_name_parent)
18
{
19
    x = obj_dialogue_box_battle.x + 44
20
    if (global.act_number == 1)
21
        y = obj_dialogue_box_battle.y + 36
22
    else if (global.act_number == 2)
23
        y = obj_dialogue_box_battle.y + 68
24
    else if (global.act_number == 3)
25
        y = obj_dialogue_box_battle.y + 100
26
}
27
else if (!instance_exists(obj_text_battle_move_selected_enemy_name_parent))
28
{
29
    if (global.act_number_row == 1)
30
        x = obj_dialogue_box_battle.x + 44
31
    else if (global.act_number_row == 2)
32
        x = obj_dialogue_box_battle.x + 300
33
    if (global.act_number_column == 1)
34
        y = obj_dialogue_box_battle.y + 36
35
    else if (global.act_number_column == 2)
36
        y = obj_dialogue_box_battle.y + 68
37
    else if (global.act_number_column == 3)
38
        y = obj_dialogue_box_battle.y + 100
39
}
40
var player_character = global.player_character
41
switch player_character
42
{
43
    case "CLOVER":
44
        sprite_index = spr_heart_yellow_down
45
        break
46
    default:
47
        var soul_mode = global.soul_mode
48
        if (soul_mode == "Red")
49
        {
50
            sprite_index = spr_heart_red
51
            break
52
        }
53
        else if (soul_mode == "Blue")
54
        {
55
            sprite_index = spr_heart_blue_down
56
            break
57
        }
58
        else if (soul_mode == "Green")
59
        {
60
            sprite_index = spr_heart_green
61
            break
62
        }
63
        else if (soul_mode == "Purple")
64
        {
65
            sprite_index = spr_heart_purple
66
            break
67
        }
68
        else if (soul_mode == "Yellow")
69
        {
70
            sprite_index = spr_heart_yellow_up_original
71
            break
72
        }
73
        else if (soul_mode == "Yellow Rhythm")
74
            sprite_index = spr_heart_yellow_down
75
}