Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_player_Draw_0

(view raw script w/o annotations or w/e)
1
var over = false;
2
with (obj_susiezilla_gamecontroller)
3
    over = gameover;
4
var shakeamt = 0;
5
if (drawshake == 8)
6
    shakeamt = 8;
7
if (drawshake == 7)
8
    shakeamt = -8;
9
if (drawshake == 6)
10
    shakeamt = 6;
11
if (drawshake == 5)
12
    shakeamt = -6;
13
if (drawshake == 4)
14
    shakeamt = 4;
15
if (drawshake == 3)
16
    shakeamt = -4;
17
if (drawshake == 2)
18
    shakeamt = 2;
19
if (drawshake == 1)
20
    shakeamt = -2;
21
if (!over)
22
    drawshake--;
23
draw_set_color(#5F3417);
24
draw_line_width(x + 24 + 8, y + 14, x + 24 + 8 + (hspeed / 2), -5, 4);
25
if (!(invuln && (global.time % 4) < 2) || over)
26
{
27
    draw_set_color(c_white);
28
    if (facing == 0)
29
        draw_sprite_ext(sprite_index, image_index, x + shakeamt, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
30
    else
31
        draw_sprite_ext(sprite_index, image_index, x + 72 + shakeamt, y, -2, 2, image_angle, image_blend, image_alpha);
32
}
33
draw_sprite_ext(spr_susiezilla_shadowSpot, 0, x + 12 + shakeamt, y + 84, 2, 2, 0, c_black, 0.5);
34
if (hitstop > 0)
35
{
36
    d3d_set_fog(true, c_yellow, 0, 1);
37
    if (facing == 0)
38
        draw_sprite_ext(sprite_index, image_index, x + shakeamt, y, 2, 2, image_angle, image_blend, 0.5);
39
    else
40
        draw_sprite_ext(sprite_index, image_index, x + 72 + shakeamt, y, -2, 2, image_angle, image_blend, 0.5);
41
    d3d_set_fog(false, c_black, 0, 0);
42
}
43
if (button1con == 1)
44
{
45
    if ((button1holdtime % 6) == 0)
46
        buttonflash = 1;
47
    else if (!over)
48
        buttonflash = lerp(buttonflash, 0, 0.125);
49
    d3d_set_fog(true, c_white, 0, 1);
50
    if (facing == 0)
51
        draw_sprite_ext(sprite_index, image_index, x + shakeamt, y, 2, 2, image_angle, image_blend, image_alpha * buttonflash * 0.5);
52
    else
53
        draw_sprite_ext(sprite_index, image_index, x + 72 + shakeamt, y, -2, 2, image_angle, image_blend, image_alpha * buttonflash * 0.5);
54
    d3d_set_fog(false, c_black, 0, 0);
55
}
56
else
57
{
58
    buttonflash = 0;
59
}