Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_cutscene_snowdin_16_Step_0

(view raw script w/o annotations or w/e)
1
switch (scene)
2
{
3
    case 0:
4
        with (actor_martlet)
5
        {
6
            action_sprite = true;
7
            sprite_index = spr_martlet_hammer;
8
            image_speed = 0.4;
9
        }
10
        audio_sound_gain(obj_radio.current_song, 0, 750);
11
        if (!audio_is_playing(mus_birdsofafeather) && audio_sound_get_gain(obj_radio.current_song) < 0.1)
12
        {
13
            audio_play_sound(mus_birdsofafeather, 20, 1);
14
            timer = 60;
15
            scene++;
16
        }
17
        break;
18
    case 1:
19
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
20
            exit;
21
        with (actor_martlet)
22
            sprite_index = spr_martlet_hammer_getup;
23
        scene++;
24
        break;
25
    case 2:
26
        with (actor_martlet)
27
        {
28
            if (on_animation_end())
29
            {
30
                instance_create(x + 13, y, obj_martlet_bridge_note);
31
                sprite_index = spr_martlet_fly_away;
32
                image_speed = 0.3;
33
                other.scene++;
34
            }
35
        }
36
        break;
37
    case 3:
38
        with (actor_martlet)
39
        {
40
            if (floor(image_index) == 11 && obj_martlet_bridge_note.image_speed == 0)
41
            {
42
                audio_play_sound(snd_gun_hit, 1, 0);
43
                obj_martlet_bridge_note.image_speed = 0.3;
44
            }
45
            if (on_animation_end())
46
            {
47
                image_alpha = 0;
48
                image_speed = 0;
49
                other.scene++;
50
                other.timer = 60;
51
                scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(arg0, arg1) { var snd = arg0; var fade_len = arg1; if (!audio_is_playing(snd)) return false; audio_sound_gain(snd, 0, fade_len); if (instance_exists(obj_audio_fade_helper)) { with (obj_audio_fade_helper) { if (audio_to_fade == snd) return false; } } with (instance_create(0, 0, obj_audio_fade_helper)) audio_to_fade = snd; }
(163, 500);
52
            }
53
        }
54
        break;
55
    case 4:
56
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
57
            exit;
58
        audio_sound_gain(obj_radio.current_song, 1, 500);
59
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
60
        audio_sound_gain(snd_snowdin_bridge, 0.5, 1200);
61
        audio_sound_gain(mus_ambient_river, 1, 1200);
62
        global.snowdin_flag[17] = 1;
63
        instance_destroy();
64
        instance_destroy(actor_martlet);
65
        break;
66
}