Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_cybercity_bg_lightset_Draw_0

(view raw script w/o annotations or w/e)
1
timer++;
2
minitimer++;
3
minitimerthreshold = 2;
4
timerthreshold = 12;
5
for (i = 0; i < l; i++)
6
{
7
    if (mode < 2)
8
    {
9
        yscale[i] = lerp(yscale[i], 0, 0.06);
10
        if (yscale[i] > 0)
11
            yscale[i] -= 0.02;
12
    }
13
    if (mode == 2 && minitimer >= minitimerthreshold)
14
    {
15
        barsiner[i]++;
16
        yscale[i] = (0.6 * h) + (sin(barsiner[i] / 2) * 0.3 * h) + (sin(barsiner[i] / 3) * 0.1 * h);
17
    }
18
    if (mode == 0)
19
    {
20
        if (yscale[i] < (0.8 * h))
21
        {
22
            if (floor(random(12)) == 0)
23
                yscale[i] = 1 * h;
24
        }
25
    }
26
    if (mode == 1)
27
    {
28
        if (timer >= timerthreshold)
29
            yscale[i] = min(yscale[i] + random(0.5 * h), 1 * h);
30
    }
31
    draw_sprite_ext(sprite_index, image_index, x + (i * 40), y, 1, yscale[i], 0, color[i], image_alpha);
32
}
33
if (timer >= timerthreshold)
34
    timer = 0;
35
if (minitimer >= minitimerthreshold)
36
    minitimer = 0;