Deltarune (Chapter 4) 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
var xx = 0;
21
var yy = 0;
22
if (special == 1)
23
{
24
    xx = -60;
25
    yy = -50;
26
}
27
if (t >= 1 && t <= 5)
28
{
29
    for (i = 0; i < 2; i += 1)
30
    {
31
        star[starcount] = instance_create(x + xx + random(sprite_width), y + yy + random(sprite_height), obj_marker);
32
        with (star[starcount])
33
        {
34
            image_xscale = 2;
35
            image_yscale = 2;
36
            sprite_index = spr_sparestar_anim;
37
            image_alpha = 2;
38
            image_speed = 0.25;
39
            hspeed = -3;
40
            gravity = 0.5;
41
            gravity_direction = 0;
42
        }
43
        starcount += 1;
44
    }
45
}
46
if (t >= 5 && t <= 30)
47
{
48
    for (i = 0; i < starcount; i += 1)
49
    {
50
        with (star[i])
51
        {
52
            image_angle += 10;
53
            image_alpha -= 0.1;
54
            if (image_alpha <= 0)
55
                instance_destroy();
56
        }
57
    }
58
}
59
if (t >= 5 && t < 10)
60
    tone += 1;
61
if (t >= 9)
62
{
63
    neotone += 1;
64
    if (neotone >= 30)
65
    {
66
        for (i = 0; i < starcount; i += 1)
67
        {
68
            with (star[i])
69
                instance_destroy();
70
        }
71
        instance_destroy();
72
    }
73
}
74
t += 1;