Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_kris_headobj_Step_0

(view raw script w/o annotations or w/e)
1
if (breakcon == 1)
2
{
3
    breaktimer = 0;
4
    
scr_oflash
scr_oflash

function
scr_oflash()
{ _oflash = instance_create(x, y, obj_oflash); _oflash.image_xscale = image_xscale; _oflash.image_speed = 0; _oflash.image_index = image_index; _oflash.image_yscale = image_yscale; _oflash.sprite_index = sprite_index; _oflash.depth = depth - 1; _oflash.target = id; return _oflash; }
();
5
    breakcon = 2;
6
}
7
if (breakcon == 2)
8
{
9
    breaktimer++;
10
    if (breaktimer >= 4)
11
    {
12
        snd_play(snd_sparkle_glock);
13
        image_alpha = 0;
14
        breakcon = 3;
15
        for (i = 0; i < 30; i++)
16
        {
17
            sparkle[i] = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(x + random_range(-15, 15), y + random_range(-15, 15), spr_sparestar_anim);
18
            sparkle[i].image_speed = 0.5;
19
            sparkle[i].hspeed = random_range(-3, 3);
20
            sparkle[i].friction = 0.05;
21
            sparkle[i].gravity = -0.1;
22
        }
23
    }
24
}