Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_1_controller_base_Step_0

(view raw script w/o annotations or w/e)
1
if (global.current_hp_self <= 0)
2
    instance_destroy()
3
if instance_exists(obj_heart_battle_menu_fight)
4
{
5
    if instance_exists(obj_text_battle_move_selected_enemy_fight_parent)
6
    {
7
        with (obj_heart_battle_menu)
8
        {
9
            no_loop = false
10
            image_alpha = 1
11
        }
12
        with (obj_text_battle_move_selected_enemy_fight_parent)
13
            instance_destroy()
14
        with (obj_battle_hp_enemy_parent)
15
            instance_destroy()
16
        instance_destroy(obj_heart_battle_menu_fight)
17
    }
18
    instance_create_depth(0, 0, -100, obj_flowey_battle_screen_glitch)
19
    if (!audio_is_playing(snd_flowey_laugh))
20
    {
21
        flowey_laugh = audio_play_sound(snd_flowey_laugh, 1, 0)
22
        audio_sound_set_track_position(flowey_laugh, irandom_range(0, (audio_sound_length(flowey_laugh) * 0.75)))
23
        audio_sound_gain(flowey_laugh, 0, 0)
24
        audio_sound_gain(flowey_laugh, 1, 200)
25
        if (!alarm[0])
26
            alarm[0] = 15
alarm[0]

scr_audio_fade_out(flowey_laugh, 300)
27
    }
28
}
29
if instance_exists(obj_heart_battle_menu_item)
30
{
31
    if instance_exists(obj_text_battle_move_selected_item_parent)
32
    {
33
        with (obj_heart_battle_menu)
34
        {
35
            no_loop = false
36
            image_alpha = 1
37
        }
38
        with (obj_text_battle_move_selected_item_parent)
39
            instance_destroy()
40
        with (obj_text_battle_move_selected_item_page_count)
41
            instance_destroy()
42
        instance_destroy(obj_heart_battle_menu_item)
43
    }
44
    instance_create_depth(0, 0, -100, obj_flowey_battle_screen_glitch)
45
    if (!audio_is_playing(snd_flowey_laugh))
46
    {
47
        flowey_laugh = audio_play_sound(snd_flowey_laugh, 1, 0)
48
        audio_sound_set_track_position(flowey_laugh, irandom_range(0, (audio_sound_length(flowey_laugh) * 0.75)))
49
        audio_sound_gain(flowey_laugh, 0, 0)
50
        audio_sound_gain(flowey_laugh, 1, 200)
51
        if (!alarm[0])
52
            alarm[0] = 15
alarm[0]

scr_audio_fade_out(flowey_laugh, 300)
53
    }
54
}