Deltarune (Chapter 2) 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 *= 2.5;
23
        }
24
    }
25
    if (timer >= 15)
26
    {
27
        if (type == 0)
28
        {
29
            if (r_index < 8)
30
                r_index += 0.334;
31
            else
32
                r_index = 8;
33
        }
34
        if (type == 1)
35
        {
36
            draw_sprite_ext(spr_checkers_idle, 0, x, (y - 32) + (r_index * 4), image_xscale, image_yscale, 0, c_white, 1);
37
            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));
38
            if (r_index < 8)
39
                r_index += 0.334;
40
            else
41
                r_index = 8;
42
        }
43
    }
44
    if (timer >= 36)
45
    {
46
        if (rect_width >= 2)
47
        {
48
            rect_width -= 1;
49
            rect_width *= 0.9;
50
        }
51
        else
52
        {
53
            rect_width = 0;
54
        }
55
    }
56
}