Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_knight_roaring_fx_Draw_0

(view raw script w/o annotations or w/e)
1
var px = x + (sprite_width * 0.42);
2
var py = y + (sprite_height * 0.5);
3
if (bar)
4
{
5
    draw_line_width_color(px, py - (bar * 40), px, py + (bar * 40), bar, c_white, c_white);
6
    bar *= 0.65;
7
    if (bar < 0.5)
8
        bar = 0;
9
}
10
if (sprite_index == spr_roaringknight_shift_ol)
11
{
12
    var xoff = 0;
13
    var yoff = 0;
14
    if (shudder)
15
    {
16
        xoff = irandom_range(-1, 1);
17
        yoff = irandom_range(-1, 1);
18
    }
19
    draw_sprite_ext(sprite_index, image_index, (x - 20) + xoff, y + 20 + yoff, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
20
    if (whiteout)
21
    {
22
        gpu_set_fog(true, c_white, 0, 0);
23
        draw_sprite_ext(sprite_index, image_index, (x - 20) + xoff, y + 20 + yoff, image_xscale, image_yscale, image_angle, image_blend, whiteout_counter);
24
        gpu_set_fog(false, c_black, 0, 0);
25
    }
26
}
27
else
28
{
29
    draw_sprite_ext(sprite_index, image_index, x, y + (sin(global.time * 0.2) * 2), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
30
}