Deltarune (Chapter 2) 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; if (global.chapter == 2 && object_index == obj_mauswheel_enemy) _oflash.sprite_index = spr_mauswheel_idle; else _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 (var 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
}
25
if (i_ex(obj_room_dw_city_postbaseball))
26
{
27
    if (obj_room_dw_city_postbaseball.minigame == 1)
28
    {
29
        if (mousefailcon == 1 && global.interact == 0)
30
        {
31
            global.interact = 1;
32
            global.facing = 1;
33
            obj_mainchara.fun = 1;
34
            obj_mainchara.sprite_index = spr_krisb_defeat;
35
            yoffset = 0;
36
            sprite_index = spr_mousefunnel_tilted;
37
            snd_play(snd_noise);
38
            if (miceheld > 0)
39
            {
40
                var mousedrop = clamp(10, 1, miceheld);
41
                for (var i = 0; i < mousedrop; i++)
42
                {
43
                    miceheld--;
44
                    var mousepart = instance_create(x, y, obj_afterimage);
45
                    mousepart.sprite_index = spr_holemouse_emerge;
46
                    
scr_darksize
scr_darksize

function
scr_darksize(arg0)
{ inst = arg0; inst.image_xscale = 2; inst.image_yscale = 2; }
(mousepart);
47
                    mousepart.image_alpha = 2;
48
                    with (mousepart)
49
                        
scr_jump_to_point
scr_jump_to_point

function
scr_jump_to_point(arg0, arg1, arg2, arg3)
{ return
scr_jump_to_point_sprite(arg0, arg1, arg2, arg3, 0, 0);
}
(x + random_range(-40, 40), room_height + (sprite_height * 2), 20, 16);
50
                }
51
            }
52
            mousefailcon++;
53
            mousetimer = 0;
54
        }
55
        if (mousefailcon == 2)
56
        {
57
            mousetimer++;
58
            if (i_ex(obj_city_cyberballoon_mouse))
59
                mousetimer = 0;
60
            if (mousetimer >= 25)
61
            {
62
                obj_mainchara.fun = 0;
63
                global.interact = 0;
64
                yoffset = 0;
65
                sprite_index = spr_mousefunnel;
66
                mousefailcon = 0;
67
            }
68
        }
69
    }
70
    else
71
    {
72
        mousefailcon = 0;
73
    }
74
}