Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_player_trail_Draw_0

(view raw script w/o annotations or w/e)
1
if (type == 0)
2
{
3
    for (i = 0; i < 25; i += 5)
4
    {
5
        var alpha;
6
        if (i < obj_maus_cursor_follow.followindex)
7
            alpha = ((i + 60) - obj_maus_cursor_follow.followindex) / 60;
8
        else
9
            alpha = (i - obj_maus_cursor_follow.followindex) / 60;
10
        draw_sprite_ext(spr_maus_player_trail, 0, obj_maus_cursor_follow.heartposx[i], obj_maus_cursor_follow.heartposy[i], 1, 1, 0, c_white, alpha);
11
    }
12
}
13
if (type == 1)
14
{
15
    draw_set_color(c_gray);
16
    for (i = 0; i < 26; i += 1)
17
        draw_line_width(obj_maus_cursor_follow.heartposx[i] + 10, obj_maus_cursor_follow.heartposy[i] + 10, obj_maus_cursor_follow.heartposx[i] + 1 + 10, obj_maus_cursor_follow.heartposy[i] + 1 + 10, 4);
18
}