Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_spareanim_Draw_0

(view raw script w/o annotations or w/e)
1
if (t >= 6 && t <= 26)
2
{
3
    afterimage += 1;
4
    d3d_set_fog(true, c_white, 0, 1);
5
    draw_sprite_ext(sprite_index, image_index, x + (afterimage * 4), y, image_xscale, image_yscale, 0, image_blend, 0.7 - (afterimage / 25));
6
    draw_sprite_ext(sprite_index, image_index, x + (afterimage * 8), y, image_xscale, image_yscale, 0, image_blend, 0.4 - (afterimage / 30));
7
    d3d_set_fog(false, c_black, 0, 0);
8
}
9
if (t < 6)
10
{
11
    if (t < 5)
12
        draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, image_blend, 1 - (neotone / 4));
13
    d3d_set_fog(true, c_white, 0, 1);
14
    maxwhite = t / 5;
15
    if (maxwhite > 1)
16
        maxwhite = 1;
17
    draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, image_blend, maxwhite - (tone / 5));
18
    d3d_set_fog(false, c_black, 0, 0);
19
}
20
if (t >= 1 && t <= 5)
21
{
22
    for (i = 0; i < 2; i += 1)
23
    {
24
        star[starcount] = instance_create(x + random(sprite_width), y + random(sprite_height), obj_marker);
25
        with (star[starcount])
26
        {
27
            image_xscale = 2;
28
            image_yscale = 2;
29
            sprite_index = spr_sparestar_anim;
30
            image_alpha = 2;
31
            image_speed = 0.25;
32
            hspeed = -3;
33
            gravity = 0.5;
34
            gravity_direction = 0;
35
        }
36
        starcount += 1;
37
    }
38
}
39
if (t >= 5 && t <= 30)
40
{
41
    for (i = 0; i < starcount; i += 1)
42
    {
43
        with (star[i])
44
        {
45
            image_angle += 10;
46
            image_alpha -= 0.1;
47
            if (image_alpha <= 0)
48
                instance_destroy();
49
        }
50
    }
51
}
52
if (t >= 5 && t < 10)
53
    tone += 1;
54
if (t >= 9)
55
{
56
    neotone += 1;
57
    if (neotone >= 30)
58
    {
59
        for (i = 0; i < starcount; i += 1)
60
        {
61
            with (star[i])
62
                instance_destroy();
63
        }
64
        instance_destroy();
65
    }
66
}
67
t += 1;