Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_crusher_Collision_obj_yheart_shot

(view raw script w/o annotations or w/e)
1
if (destroying)
2
    exit;
3
if (offset > offsetCap)
4
{
5
    if (abs(y - other.y) < offset)
6
    {
7
        exit;
8
    }
9
    else
10
    {
11
        with (other)
12
            event_user(0);
13
    }
14
}
15
else if (abs(y - 8 - other.y) <= (24 * image_xscale) && destroyable == 1)
16
{
17
    flash = 1;
18
    hp -= other.damage;
19
    if (other.big == 1 && hp < 1)
20
    {
21
    }
22
    else
23
    {
24
        with (other)
25
            event_user(0);
26
    }
27
    if (new_movement == 0)
28
    {
29
        if (difficulty == 4)
30
        {
31
            pushback = 13;
32
            if (other.big == 1)
33
                pushback = 22;
34
        }
35
        if (difficulty == 6)
36
        {
37
            pushback = 22;
38
            if (other.big == 1)
39
                pushback = 22;
40
            depth += 1;
41
            image_blend = c_gray;
42
        }
43
    }
44
    else
45
    {
46
        if (other.big == 1)
47
        {
48
            if (hspeed < 10)
49
                hspeed = 10;
50
            vspeed += random_range(3, -3);
51
        }
52
        if (other.big == 0)
53
        {
54
            if (hspeed < 0)
55
                hspeed = 0;
56
            hspeed += 2;
57
            vspeed *= 1.2;
58
        }
59
    }
60
    if (hp <= 0)
61
    {
62
        active = 0;
63
        destroying = 15;
64
        var d = instance_create(x + random_range(-10, 10), y, obj_animation_dx);
65
        d.sprite_index = spr_thrash_missile_explosion;
66
        d.depth = depth - 1;
67
        
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(5);
68
        if (difficulty == 3 || difficulty == 5)
69
            event_user(0);
70
        if (crushedObj == 2)
71
            event_user(1);
72
    }
73
}