Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_rurus_appear_Draw_0

(view raw script w/o annotations or w/e)
1
if (timer >= 0)
2
{
3
    if (type == 1)
4
        sprite_index = spr_checkers_idle_white;
5
    timer += 1;
6
    xc = x + (sprite_width / 2);
7
    draw_set_color(c_white);
8
    if (rect_width > 1)
9
    {
10
        for (i = 3; i >= 1; i -= 1)
11
        {
12
            draw_set_alpha(((1.25 - (i / 4)) * rect_width) / 50);
13
            draw_rectangle(xc - (rect_width * (1 + (i / 4))), -200, xc + (rect_width * (1 + (i / 4))), y + sprite_height, false);
14
        }
15
    }
16
    draw_set_alpha(1);
17
    if (timer <= 15)
18
    {
19
        if (rect_width <= 50)
20
        {
21
            rect_width += 2;
22
            rect_width *= 1.25;
23
        }
24
    }
25
    if (timer >= 15)
26
    {
27
        if (type == 0)
28
        {
29
            draw_sprite_ext(sprite_index, r_index, x, (y - 32) + (r_index * 4), image_xscale, image_yscale, 0, c_white, 1);
30
            if (r_index < 8)
31
                r_index += 0.334;
32
            else
33
                r_index = 8;
34
        }
35
        if (type == 1)
36
        {
37
            draw_sprite_ext(spr_checkers_idle, 0, x, (y - 32) + (r_index * 4), image_xscale, image_yscale, 0, c_white, 1);
38
            draw_sprite_ext(spr_checkers_idle_white, 0, x, (y - 32) + (r_index * 4), image_xscale, image_yscale, 0, c_white, 1 - (r_index / 8));
39
            if (r_index < 8)
40
                r_index += 0.334;
41
            else
42
                r_index = 8;
43
        }
44
    }
45
    if (timer >= 36)
46
    {
47
        if (rect_width >= 2)
48
        {
49
            rect_width -= 1;
50
            rect_width *= 0.9;
51
        }
52
        else
53
        {
54
            rect_width = 0;
55
        }
56
    }
57
}