Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gerson_hammer_bro_hammer_Step_2

(view raw script w/o annotations or w/e)
1
if (gigahammer)
2
{
3
    if (y > (obj_growtangle.y + 20) && !true_drop)
4
    {
5
        with (obj_growtangle)
6
        {
7
            y += (other.y - other.yprevious);
8
            y = min(y, __view_get(e__VW.YView, 0) + 220);
9
            with (obj_heart)
10
                y += (obj_growtangle.y - obj_growtangle.yprevious);
11
        }
12
    }
13
    if (!true_drop && y > (__view_get(e__VW.YView, 0) + 220))
14
    {
15
        true_drop = true;
16
        vspeed = -16;
17
        snd_play(snd_impact);
18
        snd_play_pitch(snd_metal_hit_reverb, 1);
19
        
scr_shakescreen
scr_shakescreen

function
scr_shakescreen(arg0 = 4, arg1 = 4)
{ var shaker = instance_create(x, y, obj_shake); if (i_ex(shaker)) { shaker.shakex = arg0; shaker.shakey = arg1; } }
();
20
    }
21
    if (true_drop && y > (__view_get(e__VW.YView, 0) + 720))
22
    {
23
        
scr_shakescreen
scr_shakescreen

function
scr_shakescreen(arg0 = 4, arg1 = 4)
{ var shaker = instance_create(x, y, obj_shake); if (i_ex(shaker)) { shaker.shakex = arg0; shaker.shakey = arg1; } }
();
24
        snd_play_pitch(snd_glassbreak, 0.5);
25
        snd_play_pitch(snd_explosion_firework, 0.75);
26
        instance_destroy();
27
    }
28
    if (image_alpha < 0.8)
29
        active = 0;
30
}
31
32
enum e__VW
33
{
34
    XView,
35
    YView,
36
    WView,
37
    HView,
38
    Angle,
39
    HBorder,
40
    VBorder,
41
    HSpeed,
42
    VSpeed,
43
    Object,
44
    Visible,
45
    XPort,
46
    YPort,
47
    WPort,
48
    HPort,
49
    Camera,
50
    SurfaceID
51
}