Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_cybercity_bg_screen_Draw_0

(view raw script w/o annotations or w/e)
1
frametimer++;
2
frametimerthreshold = 2;
3
if (con == 2)
4
    frametimerthreshold = 4;
5
if (frametimer >= frametimerthreshold)
6
{
7
    if (con == 0)
8
    {
9
        timer++;
10
        image_xscale = lerp(image_xscale, 3, 0.5);
11
        image_yscale = image_xscale;
12
        if (image_xscale >= 2.5)
13
            con = 1;
14
    }
15
    if (con == 1)
16
    {
17
        image_xscale = lerp(image_xscale, 2, 0.5);
18
        image_yscale = image_xscale;
19
        if ((abs(image_xscale) - 2) <= 0.05)
20
        {
21
            image_xscale = 2;
22
            image_yscale = 2;
23
            con = 2;
24
        }
25
    }
26
    if (con == 2)
27
    {
28
        siner++;
29
        y += (sin(siner / 4) * 0.2);
30
        y = ystart + random_range(-2, 2);
31
        x = xstart + random_range(-2, 2);
32
    }
33
    frametimer = 0;
34
}
35
animtimer++;
36
if (animtimer == 15)
37
    image_index++;
38
if (animtimer == 30)
39
{
40
    image_index--;
41
    animtimer = 0;
42
}
43
draw_self();