Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_heart_battle_menu_fight_fake_martlet_Step_0

(view raw script w/o annotations or w/e)
1
var enemy_count = global.enemy_count
2
var enemy_dead = global.enemy_dead
3
var enemy_spared = global.enemy_spared
4
if (enemy_count >= 2)
5
{
6
    var enemy_dead_2 = global.enemy_dead_2
7
    var enemy_spared_2 = global.enemy_spared_2
8
}
9
if (enemy_count >= 3)
10
{
11
    var enemy_dead_3 = global.enemy_dead_3
12
    var enemy_spared_3 = global.enemy_spared_3
13
}
14
if key_select_simulate
15
{
16
    if (global.fight_number == 1)
17
    {
18
        global.last_action_selected = "Fight"
19
        global.last_action_selected_2 = "Nothing"
20
        global.last_action_selected_3 = "Nothing"
21
    }
22
    else if (global.fight_number == 2)
23
    {
24
        global.last_action_selected = "Nothing"
25
        global.last_action_selected_2 = "Fight"
26
        global.last_action_selected_3 = "Nothing"
27
    }
28
    else if (global.fight_number == 3)
29
    {
30
        global.last_action_selected = "Nothing"
31
        global.last_action_selected_2 = "Nothing"
32
        global.last_action_selected_3 = "Fight"
33
    }
34
    script_execute(gml_Script_scr_create_player_attack)
35
    audio_play_sound(snd_battle_item_weapon_select, 20, false)
36
    if instance_exists(obj_text_battle_move_selected_enemy_fight_parent)
37
    {
38
        with (obj_text_battle_move_selected_enemy_fight_parent)
39
            instance_destroy()
40
    }
41
    if instance_exists(obj_battle_hp_enemy_parent)
42
    {
43
        with (obj_battle_hp_enemy_parent)
44
            instance_destroy()
45
    }
46
    instance_destroy()
47
}
48
x = obj_dialogue_box_battle.x + 44
49
if (global.fight_number == 1)
50
    y = obj_dialogue_box_battle.y + 36
51
else if (global.fight_number == 2)
52
    y = obj_dialogue_box_battle.y + 68
53
else if (global.fight_number == 3)
54
    y = obj_dialogue_box_battle.y + 100