Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_heart_battle_menu_fight_fake_martlet_Create_0

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