Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_swatchling_bird_Draw_0

(view raw script w/o annotations or w/e)
1
if (colorlerp < 1)
2
{
3
    if (image_alpha < 1)
4
    {
5
        image_alpha += 0.2;
6
    }
7
    else
8
    {
9
        image_blend = merge_color(startcolor, c_white, colorlerp);
10
        colorlerp += 0.05;
11
    }
12
}
13
if (colorlerp == 1)
14
{
15
    var fadebird = 0;
16
    if (hspeed > 0 && x > (gt_maxx() + 10))
17
        fadebird = 1;
18
    if (hspeed < 0 && x < (gt_minx() - 10))
19
        fadebird = 1;
20
    if (vspeed > 0 && y > (gt_maxy() + 10))
21
        fadebird = 1;
22
    if (vspeed < 0 && y < (gt_miny() - 10))
23
        fadebird = 1;
24
    if (fadebird == 1)
25
        image_alpha -= 0.2;
26
    if (image_alpha <= 0)
27
        instance_destroy();
28
}
29
draw_self();