Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_lilguy_Other_10

(view raw script w/o annotations or w/e)
1
if (destroyable == 1)
2
{
3
    if (bighead && hitshot.big == 0)
4
    {
5
        snd_play_x(snd_bell, 0.8, 0.7 + random(0.1));
6
        with (hitshot)
7
        {
8
            x -= abs(hspeed);
9
            hspeed = -8;
10
            vspeed = choose(-8, 8, 10, -10);
11
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, 90);
12
        }
13
    }
14
    else
15
    {
16
        if (hitshot.big == 0)
17
        {
18
            with (hitshot)
19
                event_user(0);
20
        }
21
        snd_volume(snd_bomb, 0.7, 0);
22
        snd_play_x(snd_bomb, 0.7, 1.1 + random(0.2));
23
        var _cut = 
scr_afterimage_cut
scr_afterimage_cut

function
scr_afterimage_cut()
{ afterimage = instance_create(x, y, obj_afterimage_cut); 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; with (afterimage) event_user(0); return afterimage; }
();
24
        _cut.flash = true;
25
        instance_destroy();
26
    }
27
}