Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_overworld_spinningSpade_Step_0

(view raw script w/o annotations or w/e)
1
image_angle += 4;
2
if (active == 2)
3
{
4
    fade = 
scr_afterimage_grow
scr_afterimage_grow

function
scr_afterimage_grow()
{ afterimage = instance_create(x, y, obj_afterimage_grow); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; afterimage.image_alpha = image_alpha; return afterimage; }
();
5
    fade.xrate = 0.4;
6
    fade.yrate = 0.4;
7
    inactivetimer = 30;
8
    active = 3;
9
}
10
if (active == 3)
11
{
12
    image_alpha = lerp(image_alpha, 0, 0.35);
13
    inactivetimer--;
14
    if (inactivetimer <= 0)
15
    {
16
        inactivetimer = 0;
17
        active = 4;
18
    }
19
}
20
if (active == 4)
21
{
22
    image_alpha = lerp(image_alpha, 1, 0.35);
23
    if (image_alpha == 1)
24
        active = 1;
25
}