Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_flashback_room_final_controller_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (room == rm_battle_flashback_final)
4
{
5
    if (draw_alpha_white > 0)
6
    {
7
        draw_alpha_white -= 0.05
8
        return;
9
    }
10
    else if instance_exists(obj_flowey_battle_ow_controller)
11
        obj_flowey_battle_ow_controller.spawn_vines = true
12
    if (obj_pl.x >= layer_remove_x_next)
13
    {
14
        layer_remove_x_next += layer_remove_x_inc
15
        instance_create_depth(0, 0, -9999, obj_flowey_battle_screen_glitch)
16
        if (ds_list_size(layer_list) > 1)
17
        {
18
            layer_set_visible(ds_list_find_value(layer_list, 0), false)
19
            layer_set_visible(ds_list_find_value(layer_list, 1), true)
20
            ds_list_delete(layer_list, 0)
21
        }
22
        else
23
        {
24
            fade_out = true
25
            layer_remove_x_next = 999999
26
        }
27
    }
28
    if (fade_out == true)
29
    {
30
        draw_alpha += 0.016666666666666666
31
        if (draw_alpha >= 2)
32
        {
33
            if ((!instance_exists(obj_player_npc)) && scene == 0)
34
            {
35
                scene++
36
                var actor_clover = instance_create(obj_pl.x, obj_pl.y, obj_player_npc)
37
                with (actor_clover)
38
                {
39
                    action_sprite = true
40
                    if obj_pl.is_sprinting
41
                    {
42
                        sprite_index = spr_pl_run_right
43
                        image_speed = 0.3
44
                    }
45
                    else
46
                    {
47
                        sprite_index = spr_pl_right
48
                        image_speed = 0.2
49
                    }
50
                }
51
            }
52
        }
53
    }
54
    if (obj_pl.x < 2496)
55
        audio_sound_gain(global.battle_music, (1 - obj_pl.x / 2496), 1)
56
    else
57
    {
58
        audio_stop_sound(global.battle_music)
59
        obj_flowey_battle_ow_controller.spawn_vines = false
60
        obj_flowey_battle_ow_controller.persistent = true
61
    }
62
}
63
switch scene
64
{
65
    case 1:
66
        if (abs(175 - obj_player_npc.y) > 10)
67
            obj_player_npc.y += ((sign(175 - obj_pl.y)) * 3)
68
        cutscene_wait(2)
69
        break
70
    case 2:
71
        var msg = instance_create_depth(0, 0, -999, obj_dialogue_flowey_distant)
72
        with (msg)
73
        {
74
            message[0] = "* Clover?"
75
            message[1] = "* Where did you go, buddy?"
76
            message[2] = "* Get b a c k   h   e    r     e "
77
        }
78
        scene++
79
        break
80
    case 3:
81
        if (!global.dialogue_open)
82
            cutscene_advance()
83
        break
84
    case 4:
85
        cutscene_wait(1)
86
        break
87
    case 5:
88
        obj_player_npc.persistent = true
89
        persistent = true
90
        room = rm_battle_flashback_final_2
91
        global.player_can_run = false
92
        obj_player_npc.x = 160
93
        obj_player_npc.action_sprite = false
94
        draw_alpha = 0
95
        fade_out = false
96
        scene++
97
        break
98
    case 6:
99
        cutscene_npc_walk(1168, 800, obj_player_npc.y, 3, "x", "right")
100
        break
101
    case 7:
102
        cutscene_wait(1)
103
        break
104
    case 8:
105
        cutscene_camera_move(850, obj_player_npc.y, 1)
106
        break
107
    case 9:
108
        cutscene_wait(1)
109
        break
110
    case 10:
111
        instance_destroy(obj_flowey_1_controller_base)
112
        cutscene_end()
113
        break
114
}