Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dashpath_Draw_0

(view raw script w/o annotations or w/e)
1
if (i_ex(obj_heart))
2
    x_offset = obj_heart.x_offset;
3
if (act == 0)
4
{
5
    if (i_ex(obj_heart))
6
    {
7
        xx = obj_heart.x;
8
        if (obj_heart.dash_h > 4)
9
            y = obj_heart.y;
10
    }
11
    if ((i_ex(obj_heart) && obj_heart.dash_h < 4) || !i_ex(obj_heart))
12
        act = 1;
13
}
14
else
15
{
16
    alpha -= 0.2;
17
    if (alpha <= 0)
18
        instance_destroy();
19
}
20
draw_set_alpha(alpha);
21
mix = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(mix, 1, 0.05);
22
colour = merge_colour(merge_colour(c_yellow, c_red, mix), c_black, 0.5);
23
draw_set_colour(colour);
24
draw_sprite_part_ext(sprite_index, 0, 0, 0, 8, 32, x + x_offset, y, 1, 1, colour, alpha);
25
draw_rectangle(x + 8 + x_offset, y + 2, (xx + x_offset) - 1, y + 17, 0);
26
draw_sprite_part_ext(sprite_index, 0, 10, 0, 8, 32, xx + x_offset, y, 1, 1, colour, alpha);
27
draw_set_alpha(1);