Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_power_up_thrash_Draw_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    if (pivotx == -999)
4
        pivotx = sprite_width / 2;
5
    if (pivoty == -999)
6
        pivoty = sprite_height / 2;
7
    init = 1;
8
}
9
timer++;
10
effecttimer++;
11
var __alpha = clamp(timer / poweruptime, 0, 1);
12
d3d_set_fog(true, image_blend, 0, 1);
13
flashtimer++;
14
if (flashtimer >= flashspeed)
15
{
16
    flashtimer = 0;
17
    flashspeed = max(4, (flashspeed * 2) / 3);
18
}
19
var __flash = ((timer + 15) >= poweruptime) ? lerp(0.4, 0.5, sin((flashtimer / flashspeed) * pi)) : lerp(__alpha / 2, 0.5, sin((flashtimer / flashspeed) * pi));
20
thrash.glow = __flash;
21
d3d_set_fog(false, c_black, 0, 0);