Deltarune script viewer

← back to main script listing

gml_Object_obj_berdlyb_tornado_Draw_0

(view raw script w/o annotations or w/e)
1
if (init && image_alpha < 1 && firstwave <= 0)
2
{
3
    if (middespawn && firstwave == 0)
4
        image_alpha = scr_movetowards
scr_movetowards

function scr_movetowards(arg0, arg1, arg2) { if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); }
(image_alpha, remap_clamped(50, 65, timer, 0.25, 1), 0.1);
5
    else
6
        image_alpha += 0.1;
7
}
8
xflip = 1;
9
if (flipTimer < 0)
10
    xflip = -1;
11
flipTimer += 1;
12
if (flipTimer >= flipSpeed)
13
    flipTimer -= (flipSpeed * 2);
14
draw_sprite_ext(sprite_index, 0, x, y, xflip, 1, 0, image_blend, image_alpha);