Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_blue_cat_Collision_obj_meteor

(view raw script w/o annotations or w/e)
1
var doublecheck = collision_rectangle(bbox_left + boxmargin, bbox_top + boxmargin + 10, bbox_right - boxmargin, bbox_bottom - boxmargin - 4, obj_meteor, false, true);
2
if (!instance_exists(doublecheck))
3
    exit;
4
if (x < 640)
5
{
6
    var _explosion = instance_create_depth(x, y, depth - 4, obj_animation);
7
    snd_play(snd_badexplosion, 0.25);
8
    _explosion.sprite_index = spr_realisticexplosion;
9
    
scr_shakescreen
scr_shakescreen

function
scr_shakescreen(arg0 = 4, arg1 = 4)
{ var shaker = instance_create(x, y, obj_shake); if (i_ex(shaker)) { shaker.shakex = arg0; shaker.shakey = arg1; } }
(8, 8);
10
    with (instance_create(x, y, obj_green_cat))
11
    {
12
        direction = other.direction;
13
        speed = other.speed;
14
        friction = 0.2;
15
        image_angle = other.image_angle;
16
    }
17
    with (other)
18
        instance_destroy();
19
    instance_destroy();
20
}
21
else
22
{
23
    with (other)
24
        instance_destroy();
25
}