Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_wallbullet_new_Collision_obj_yheart_shot

(view raw script w/o annotations or w/e)
1
if (destroyable == 0 && other.big == 1)
2
{
3
    if ((other.y < y && instance_place(x, y - 40, obj_sneo_wallbullet_new) && instance_nearest(x, y - 40, obj_sneo_wallbullet_new).sprite_index == spr_sneo_mail) || (other.y > y && instance_place(x, y + 40, obj_sneo_wallbullet_new) && instance_nearest(x, y + 40, obj_sneo_wallbullet_new).sprite_index == spr_sneo_mail))
4
    {
5
    }
6
    else if (abs(other.y - y) > 12)
7
    {
8
        exit;
9
    }
10
}
11
hitshot = other;
12
event_user(0);
13
if (destroyable == 1 && active == 1)
14
{
15
    if (hitshot.big == 0)
16
    {
17
        with (hitshot)
18
            event_user(0);
19
    }
20
    snd_volume(snd_bomb, 0.7, 0);
21
    snd_play_x(snd_bomb, 0.7, 1.1 + random(0.2));
22
    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; }
();
23
    _cut.flash = true;
24
    anim = instance_create(x, y, obj_yshot_anim);
25
    anim.image_xscale = image_xscale;
26
    anim.image_yscale = image_yscale;
27
    with (anim)
28
        sprite_index = spr_yheart_shot_hit3;
29
    instance_destroy();
30
}