Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_cybercity_bg_trafficlight_shine_Draw_0

(view raw script w/o annotations or w/e)
1
if (stop == 0)
2
{
3
    siner++;
4
    if (mode == 1)
5
    {
6
        swingtimer++;
7
        if (swingtimer >= 10)
8
        {
9
            swingcount++;
10
            swing = swingcount % 4;
11
            if (swing == 0)
12
                image_angle = 0;
13
            if (swing == 1)
14
                image_angle = 15;
15
            if (swing == 2)
16
                image_angle = 0;
17
            if (swing == 3)
18
                image_angle = -15;
19
            swingtimer = 0;
20
        }
21
    }
22
    for (i = 0; i < 3; i++)
23
    {
24
        draw_self();
25
        draw_sprite_ext(sprite_index, 1, x, y, image_xscale, image_yscale, image_angle, c_white, sin(siner / 4));
26
        draw_sprite_ext(sprite_index, 2, x, y, image_xscale, image_yscale, image_angle, c_white, sin(2 + (siner / 4)));
27
    }
28
}
29
else
30
{
31
    image_angle = 0;
32
    draw_self();
33
    draw_sprite_ext(sprite_index, 0, x, y, image_xscale, image_yscale, 0, c_white, 1);
34
}