Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_credits_final_neutral_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (delay_timer > 1)
4
{
5
    delay_timer--
6
    return;
7
}
8
else if (delay_timer == 1)
9
{
10
    credits_song = audio_play_sound(mus_flowey_world, 20, 0)
11
    delay_timer = 0
12
}
13
if (fade_out == true)
14
{
15
    text_alpha = lerp(text_alpha, 0, 0.02)
16
    if (text_alpha < 0.01)
17
    {
18
        text_alpha = 0
19
        if (!alarm[1])
20
            alarm[1] = 120
alarm[1]

if (global.hotland_flag[10] == 0) { game_end() instance_destroy() } else { instance_create(x, y, obj_kill_ceroba_ending_flowey_cutscene) instance_destroy() }
21
    }
22
}
23
if (y_max != -1 && y_slow_down != true)
24
    y_speed = 1
25
if (y_slow_down == true)
26
{
27
    if (y_speed > 0)
28
        y_speed -= (1 / slow_down_treshold)
29
    else
30
    {
31
        y_speed = 0
32
        if (!alarm[0])
33
            alarm[0] = 240
alarm[0]

fade_out = true
34
        if (!alarm[2])
35
            alarm[2] = 90
alarm[2]

if (!flowey_noloop) { flowey_noloop = true if (global.hotland_flag[10] == 0) audio_play_sound(mus_f_newlaugh, 1, 0) }
36
    }
37
}
38
y_offset -= y_speed
39
switch scene
40
{
41
    case 0:
42
        global.cutscene = true
43
        cutscene_wait(start_delay)
44
        break
45
    case 1:
46
        if (global.hotland_flag[10] == 0)
47
            room = target_room[0]
48
        scene++
49
        break
50
    case 2:
51
        var cutscene_wait_time = room_duration / 30
52
        cutscene_wait(cutscene_wait_time)
53
        camera_set_view_pos(view_camera[0], (camera_get_view_x(view_camera[0]) + (lengthdir_x(pan_speed, pan_dir[camera_target_current]))), (camera_get_view_y(view_camera[0]) + (lengthdir_y(pan_speed, pan_dir[camera_target_current]))))
54
        var fade_out_start_point = room_duration - 60
55
        if (cutscene_timer < fade_out_start_point)
56
        {
57
            if (draw_alpha > 0.7)
58
                draw_alpha -= 0.003
59
        }
60
        else
61
        {
62
            var timer_relative = cutscene_timer - fade_out_start_point
63
            draw_alpha = 0.7 + 0.3 * (timer_relative / 60)
64
        }
65
        break
66
    case 3:
67
        if cutscene_wait(wait_timer)
68
        {
69
            if (camera_target_current < (array_length(target_room) - 1))
70
            {
71
                camera_target_current += 1
72
                if (global.hotland_flag[10] == 0)
73
                    room = target_room[camera_target_current]
74
                scene = 2
75
            }
76
            else
77
            {
78
                draw_alpha = 1
79
                scene++
80
            }
81
        }
82
        break
83
}