Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_blocktree_bg_Step_0

(view raw script w/o annotations or w/e)
1
oo = 0;
2
if (spec < 2)
3
    blocktimer += 1;
4
if (blocktimer == 20)
5
{
6
    xv = x + (sprite_width / 4) + random(sprite_width / 2);
7
    yv = y + (sprite_height / 4) + random(sprite_height / 4);
8
    block = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(xv, yv, spr_blocktree_block);
9
    with (block)
10
    {
11
        hspeed = 0.4 + random(1);
12
        vspeed = 0.7 + random(1.5);
13
        gravity_direction = 0;
14
        gravity = 0.1;
15
        image_alpha = 0;
16
        friction = -0.1;
17
    }
18
    block.depth = depth - 1;
19
    block.image_blend = merge_color(c_white, c_black, oo);
20
    if (oo >= 0.8)
21
    {
22
        with (block)
23
            instance_destroy();
24
    }
25
}
26
if (blocktimer >= 20 && blocktimer <= 30)
27
{
28
    with (block)
29
    {
30
        if (image_alpha < 1)
31
            image_alpha += 0.2;
32
    }
33
}
34
if (blocktimer >= 38)
35
{
36
    with (block)
37
        image_alpha -= 0.1;
38
}
39
if (blocktimer >= 48)
40
{
41
    blocktimer = 0;
42
    with (block)
43
        instance_destroy();
44
}