Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_laser_building_Collision_obj_susiezilla_player_hitbox

(view raw script w/o annotations or w/e)
1
if (con == 3)
2
    exit;
3
if (con == 1)
4
{
5
    con = 2;
6
    timer = 0;
7
    hp -= other.damage;
8
    flashtimer = 2;
9
    sprite_index = spr_laser_building_hurt;
10
    repeat (3)
11
        event_user(0);
12
    if (con == 1 && timer > 15)
13
    {
14
        with (fx)
15
            instance_destroy();
16
    }
17
    shakeobj = instance_create(x, y, obj_shakeobj_susiezilla);
18
    shakeobj.target = id;
19
    shakeobj.shakeamt = 12;
20
    shakeobj.shakereduct = 1;
21
    with (shakeobj)
22
        event_user(0);
23
    snd_stop(snd_damage);
24
    snd_play(snd_damage);
25
    with (other)
26
        event_user(0);
27
}
28
if (hp < 1)
29
{
30
    con = 3;
31
    repeat (3)
32
        event_user(0);
33
}