Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_musicer_gen_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (timer >= delay)
3
{
4
    if (init == 0)
5
    {
6
        if (global.plot >= plot && global.plot < highplot)
7
        {
8
            if (!snd_is_playing(global.currentsong[1]))
9
            {
10
                global.currentsong[0] = snd_init(song);
11
                global.currentsong[1] = mus_loop_ext(global.currentsong[0], volume, pitch);
12
                if (fadein != -1)
13
                {
14
                    snd_volume(global.currentsong[1], 0, 0);
15
                    snd_volume(global.currentsong[1], volume, fadein);
16
                }
17
            }
18
        }
19
        init = 1;
20
        instance_destroy();
21
    }
22
}