Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_viro_needle_Draw_0

(view raw script w/o annotations or w/e)
1
if (infection == 1 && image_index < 1)
2
    draw_sprite_ext(targetsprite, targetimage, targetx, targety, 1, 1, 1, poisoncolor, 1);
3
if (infection == 1)
4
{
5
    x = targetx;
6
    y = targety;
7
}
8
draw_self();
9
if (flash > 0)
10
{
11
    d3d_set_fog(true, merge_color(poisoncolor, c_white, 0.5), 0, 1);
12
    draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, c_white, flash / 5);
13
    d3d_set_fog(false, c_black, 0, 0);
14
    flash--;
15
}
16
var growt = obj_growtangle.x;
17
var gridth = (obj_growtangle.sprite_width / 2) + 10;
18
if ((direction == 0 && x > (growt + gridth)) || (direction == 180 && x < (growt - gridth)))
19
{
20
    active = 0;
21
    image_alpha -= 0.1;
22
    if (image_alpha == 0)
23
        instance_destroy();
24
}
25
else if (image_alpha < 1)
26
{
27
    image_alpha += 0.1;
28
}