Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_musicer_city_Step_0

(view raw script w/o annotations or w/e)
1
if (update == 1)
2
{
3
    timer++;
4
    mus_volume(global.currentsong[1], 0, 16);
5
    if (timer == 16)
6
        update = 2;
7
}
8
if (update == 2)
9
{
10
    if (scr_sideb_get_phase
scr_sideb_get_phase

function scr_sideb_get_phase() { var phase = 0; if (global.flag[916 snowgrave_fail] == 0) { if (global.flag[915 snowgrave_plot] > 0 && global.flag[915 snowgrave_plot] < 4) phase = 1; if (global.flag[915 snowgrave_plot] >= 4 && global.flag[915 snowgrave_plot] < 7) phase = 2; if (global.flag[915 snowgrave_plot] >= 7 && global.flag[915 snowgrave_plot] < 20) phase = 3; if (global.flag[915 snowgrave_plot] >= 20) phase = 4; } return phase; }
() == 2)
11
    {
12
        mysong = altsong;
13
        songspeed = 1.2;
14
    }
15
    else
16
    {
17
        mysong = defaultsong;
18
        songspeed = 0.97;
19
    }
20
    global.currentsong[0] = snd_init(mysong);
21
    global.currentsong[1] = mus_loop_ext(global.currentsong[0], 0.8, songspeed);
22
    update = 0;
23
    timer = 0;
24
}