Deltarune script viewer

← back to main script listing

gml_Object_obj_musicer_darkcastle_Create_0

(view raw script w/o annotations or w/e)
1
if (global.chapter <= 1)
2
{
3
    if (global.plot <= 30)
4
    {
5
        if (!snd_is_playing(global.currentsong[1]))
6
        {
7
            global.currentsong[0] = snd_init("creepydoor.ogg");
8
            global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 1);
9
        }
10
    }
11
    if (global.plot > 30)
12
    {
13
        global.currentsong[0] = snd_init("castletown_empty.ogg");
14
        global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 1);
15
    }
16
}
17
if (global.chapter == 2)
18
{
19
    if (!snd_is_playing(global.currentsong[1]))
20
    {
21
        if (global.plot == 8)
22
            global.currentsong[0] = snd_init("castletown_empty.ogg");
23
        if (global.plot >= 12 && global.plot < 200)
24
            global.currentsong[0] = snd_init("castletown.ogg");
25
        if (global.plot >= 200)
26
        {
27
            var mySong = "castletown.ogg";
28
            if (is_string(global.tempflag[11]))
29
                mySong = global.tempflag[11];
30
            global.currentsong[0] = snd_init(mySong);
31
        }
32
        if (global.plot == 8 || global.plot >= 12)
33
            global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 1);
34
    }
35
}