Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_darkness_trail_foreground_Draw_0

(view raw script w/o annotations or w/e)
1
if (!active)
2
    exit;
3
draw_set_color(c_black);
4
d_circle(x, y, width / 2, false);
5
var _col_a = start_color;
6
var _col_b = end_color;
7
var _lastpos = new Vector2(x, y);
8
var _pos = new Vector2(x, y);
9
with (owner)
10
{
11
    draw_set_color(c_black);
12
    d_circle(x, y, width / 2, false);
13
    var i = array_length(points) - 1;
14
    while (i >= 0)
15
    {
16
        var _size = lerp(end_size, width, points[i].life);
17
        _pos.x = points[i].x;
18
        _pos.y = points[i].y;
19
        if (i < (array_length(points) - 1))
20
        {
21
            draw_set_color(c_black);
22
            d_circle(points[i].x, points[i].y, lerp(end_size, width, points[i].life) / 2, false);
23
            d_line_width_color(_lastpos.x, _lastpos.y, _pos.x, _pos.y, _size, 0, 0);
24
        }
25
        _lastpos.x = _pos.x;
26
        _lastpos.y = _pos.y;
27
        i--;
28
    }
29
    d_line_width_color(_lastpos.x, _lastpos.y, x, y, width, 0, 0);
30
}