Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_singlescreen_shadowguy_with_gun_Other_25

(view raw script w/o annotations or w/e)
1
scr_depth_alt
scr_depth_alt

function
scr_depth_alt()
{ depth = 100000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); }
();
2
if (canhit && !i_ex(myhitbox))
3
{
4
    myhitbox = instance_create(x, y, obj_susiezilla_activehitbox);
5
    myhitbox.sprite_index = spr_whitepx;
6
    myhitbox_xoffset = -24;
7
    myhitbox_yoffset = -28;
8
    myhitbox.image_yscale = 30;
9
    myhitbox.image_xscale = 40;
10
    myhitbox.depth = depth - 20;
11
    myhitbox.image_blend = c_yellow;
12
    myhitbox.daddy = id;
13
    myhitbox.visible = false;
14
}
15
if (i_ex(myhitbox))
16
{
17
    if (!canhit)
18
        safe_delete(myhitbox);
19
}
20
if (hitstop <= 0)
21
{
22
    if (fakeheight < 0)
23
        friction = 0;
24
    else
25
        friction = 0.85;
26
    if (i_ex(obj_susiezilla_player) && state != states.dead)
27
    {
28
        if (obj_susiezilla_player.x < (x - 24))
29
            facing = 0;
30
        else
31
            facing = 1;
32
    }
33
    if (x <= 10)
34
    {
35
        x = 10;
36
        hspeed = -hspeed / 2;
37
    }
38
    if (x >= 630)
39
    {
40
        x = 630;
41
        hspeed = -hspeed / 2;
42
    }
43
    if (y <= 200)
44
    {
45
        y = 200;
46
        vspeed = -vspeed / 2;
47
    }
48
    hitdir = direction;
49
    hitspeed = speed;
50
}
51
hitstop--;
52
if (hitstop == 0)
53
{
54
    canhit = 1;
55
    speed = memspeed;
56
    direction = memdir;
57
    fakevspeed = -6;
58
    fakegravity = 1;
59
    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_index", 0, 2, 12);
60
    hitstop = -1;
61
}
62
if (hitstop > 0)
63
{
64
    kickactive = false;
65
    contimer = 0;
66
    con = 1;
67
    hopcount = 0 - irandom(2);
68
    flash = 0;
69
}
70
if (y >= 384)
71
{
72
    if (!fallcon)
73
    {
74
        fallcon = 1;
75
        snd_stop(snd_fall);
76
        snd_play(snd_fall);
77
        sprite_index = s_grab_fall;
78
        gravity = 1;
79
    }
80
}
81
if (y > (cameray() + 480 + 100))
82
    instance_destroy();
83
if (abs(hspeed) > fastestspeed)
84
    fastestspeed = abs(hspeed);
85
myxcenter = x - 6;
86
myycenter = (y - 34) + fakeheight;