Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_mail_whale_dunes_42_Step_0

(view raw script w/o annotations or w/e)
1
switch (scene)
2
{
3
    case 1:
4
        y += fly_speed;
5
        if (y > 0)
6
            mail_whale_shadow_alpha += 0.025;
7
        if (y > 100 && fly_speed > 0)
8
            fly_speed -= 0.2;
9
        else if (fly_speed == 0)
10
            scene = 2;
11
        break;
12
    case 2:
13
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
14
        with (msg)
15
        {
16
            portrait = false;
17
            message[0] = "* Hello again! I have some news!";
18
            message[1] = "* You now can ship yourself, if#  you so choose!";
19
            message[2] = "* \"Ship myself? What could that#  mean?\"";
20
            message[3] = "* Transportation, all for free!";
21
            message[4] = "* If you want to travel, give me#  a call!";
22
            message[5] = "* We will set to the skies#  without a care at all!";
23
            message[6] = "* Now I must go but don't be#  nervous...";
24
            message[7] = "* Just ring the bell for our#  service!";
25
        }
26
        scene++;
27
        break;
28
    case 3:
29
        if (!instance_exists(obj_dialogue))
30
        {
31
            y -= fly_speed;
32
            mail_whale_shadow_alpha -= 0.05;
33
            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; }
(114, 500);
34
            if (y > -40 && fly_speed < 2)
35
                fly_speed += 0.2;
36
            if (y <= -40)
37
            {
38
                instance_destroy();
39
                scr_radio_fade
scr_radio_fade

function scr_radio_fade(arg0, arg1) { var fade_vol = arg0; var fade_len = arg1; with (obj_radio) audio_sound_gain(current_song, fade_vol, fade_len); }
(1, 1000);
40
                scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
41
                global.player_can_travel = 1;
42
                instance_destroy();
43
            }
44
        }
45
        break;
46
}