Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_oflash_ext_Draw_0

(view raw script w/o annotations or w/e)
1
if (i_ex(target))
2
{
3
    image_xscale = target.image_xscale;
4
    image_yscale = target.image_yscale;
5
    x = target.x;
6
    y = target.y;
7
    sprite_index = target.sprite_index;
8
    image_index = target.image_index;
9
}
10
var fadeopacity = 1;
11
if (fadetime != -1)
12
{
13
    fadetimer++;
14
    fadeopacity = 1 - clamp(fadetimer / fadetime, 0, 1);
15
    if (fadetimer >= fadetime)
16
        instance_destroy();
17
}
18
else
19
{
20
    if (image_alpha <= 0)
21
        killtimer--;
22
    if (killtimer <= 0)
23
        instance_destroy();
24
}
25
draw_set_alpha(image_alpha * fadeopacity);
26
gpu_set_blendmode(myblend);
27
gpu_set_fog(true, image_blend, 0, 0);
28
draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, c_white, image_alpha * fadeopacity);
29
gpu_set_fog(false, c_white, 0, 0);
30
gpu_set_blendmode(bm_normal);
31
draw_set_alpha(1);