Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_singlescreen_shadowguy_with_rpg_Draw_0

(view raw script w/o annotations or w/e)
1
var shakeamt = 0;
2
if (drawshake == 4)
3
    shakeamt = 4;
4
if (drawshake == 3)
5
    shakeamt = -4;
6
if (drawshake == 2)
7
    shakeamt = 2;
8
if (drawshake == 1)
9
    shakeamt = -2;
10
var bobbl = 0;
11
if (state != states.dead)
12
    bobbl = sin(bobble * 0.1) * 3;
13
if (state == states.dead && hitstop < 0 && !gameover)
14
{
15
    speed *= 0.925;
16
    if ((abs(speed) < 6 || y > (cameray() + 420)) && state_timer < 9999)
17
    {
18
        
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; }
("ropeheight", ropeheight, ropeheight + 32, 8, 1, "out");
19
        
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(scr_lerpvar, 8, "ropeheight", ropeheight + 32, -720, 24, 1, "in");
20
        
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(instance_destroy, 60);
21
        state_timer = 9999;
22
    }
23
}
24
drawshake--;
25
draw_set_alpha(0.5);
26
draw_set_color(c_black);
27
if (fakeheight < -3)
28
    draw_sprite_ext(spr_susiezilla_shadow, 0, x, y, min(0.25 + abs(fakeheight / 40), 1), 1, 0, image_blend, (0.25 * abs(fakeheight / 28)) + 0.25);
29
draw_set_color(c_white);
30
draw_set_alpha(1);
31
draw_set_color(#5F3417);
32
if (ropeheight != -1)
33
    draw_line_width(x, 0, x, ((y + ropeheight) - 48) + bobbl, 4);
34
if (facing)
35
    draw_sprite_ext(sprite_index, image_index, round(x) + shakeamt, round(y) + fakeheight + ropeheight + bobbl, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
36
else
37
    draw_sprite_ext(sprite_index, image_index, (round(x) - 6) + shakeamt, round(y) + fakeheight + ropeheight + bobbl, -image_xscale, image_yscale, image_angle, image_blend, image_alpha);
38
if (flash)
39
{
40
    d3d_set_fog(true, c_white, 0, 0);
41
    if (facing)
42
        draw_sprite_ext(sprite_index, image_index, round(x) + shakeamt, round(y) + fakeheight + ropeheight + bobbl, image_xscale, image_yscale, image_angle, image_blend, flash / 10);
43
    else
44
        draw_sprite_ext(sprite_index, image_index, (round(x) - 6) + shakeamt, round(y) + fakeheight + ropeheight + bobbl, -image_xscale, image_yscale, image_angle, image_blend, flash / 10);
45
    d3d_set_fog(false, c_white, 0, 0);
46
}
47
flash = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(flash, 0, 1);
48
draw_set_color(c_white);
49
draw_set_alpha(1);