Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_wireheart_Collision_obj_sneo_tiny_ralsei

(view raw script w/o annotations or w/e)
1
if (other.active == 0)
2
    exit;
3
if (invincibility_timer > 0)
4
    exit;
5
invincibility_timer = 10;
6
if (global.turntimer < 150)
7
{
8
    hp = 0;
9
    if (type == 0 || (type == 1 && obj_spamton_neo_enemy.difficulty > 2 && global.turntimer > 20))
10
    {
11
        global.turntimer = 20;
12
        with (obj_sneo_wireheart)
13
        {
14
            hp = 0;
15
            destroyed = 1;
16
        }
17
    }
18
}
19
else if (type == 0 || (type == 1 && obj_spamton_neo_enemy.difficulty > 2))
20
{
21
    global.turntimer -= 80;
22
}
23
else
24
{
25
    hp -= 5;
26
    other.hp -= 10;
27
    other.alarm[0] = 10;
28
    if (!audio_is_playing(snd_hurt1))
29
        snd_play(snd_hurt1);
30
}
31
damagetimer = 5;
32
snd_play(snd_damage);
33
if (hp <= 0)
34
    destroyed = 1;