Deltarune script viewer

← back to main script listing

gml_Object_obj_car_crash_Collision_obj_queencar

(view raw script w/o annotations or w/e)
1
if (!crash)
2
{
3
    if (i_ex(obj_ch2_city_car_a))
4
    {
5
        with (obj_ch2_city_car_a)
6
            car_crash_count++;
7
    }
8
    hspeed = 0;
9
    crash = true;
10
    snd_play(snd_badexplosion);
11
    visible = 0;
12
    explosion = instance_create(x + 40, y, obj_animation);
13
    explosion.sprite_index = spr_realisticexplosion;
14
    explosion.image_xscale = 2;
15
    explosion.image_yscale = 2;
16
    with (explosion)
17
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
18
}