Deltarune script viewer

← back to main script listing

gml_Object_obj_caradventure_car_enemy_Collision_obj_caradventure_car

(view raw script w/o annotations or w/e)
1
if (other.block == 0)
2
{
3
    if (hitted == 0)
4
    {
5
        with (other)
6
            hits++;
7
        image_speed = 0;
8
        image_index = 1;
9
        hitted = 1;
10
        hspeed = 12;
11
        vspeed = -12;
12
        global.flag[462 cars_hit]++;
13
        if (small == 1)
14
        {
15
            audio_play_sound(snd_smallcar_yelp, 0, 0);
16
            audio_play_sound(snd_hitcar_little, 0, 0);
17
        }
18
        else
19
        {
20
            audio_play_sound(snd_bigcar_yelp, 0, 0);
21
            audio_play_sound(snd_hitcar, 0, 0);
22
        }
23
    }
24
}
25
else
26
{
27
    with (other)
28
        blockeffectcon = 1;
29
    x += 6;
30
    hspeed = 12;
31
    gravity_direction = 180;
32
    gravity = 0.5;
33
}