Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_chaseenemy_board_Draw_0

(view raw script w/o annotations or w/e)
1
if (speed == 0)
2
    walk_index = 1;
3
walk_index += (speed / 10);
4
var xx = round(x / 2) * 2;
5
var yy = round(y / 2) * 2;
6
drawx = 0;
7
drawscale = 1;
8
if (facing == 1 && specialspritecase == 0)
9
{
10
    drawscale = -1;
11
    drawx = sprite_width;
12
}
13
if (!freeze)
14
    drawsiner += 0.25;
15
tempx = xx;
16
x = xx + drawx;
17
superscalex = 0;
18
superdrawx = 0;
19
superscalexb = 1;
20
if (specialspritecase == 0)
21
{
22
    if (facing == 0)
23
    {
24
        superscalex = 0;
25
    }
26
    else
27
    {
28
        superscalex = -4;
29
        superscalexb = -1;
30
        superdrawx = -sprite_width * 2;
31
    }
32
}
33
if (specialspritecase == "tasque")
34
{
35
    if (facing == 1)
36
        sprite_index = spr_tasque_idle_flipped;
37
    if (facing == 0)
38
        sprite_index = spr_tasque_idle;
39
}
40
gpu_set_blendmode(bm_add);
41
for (i = 0; i < 5; i++)
42
{
43
    var aura = (i * 9) + ((drawsiner * 3) % 9);
44
    var aurax = (aura * 0.75) + (sin(aura / 4) * 4);
45
    var auray = 45 * 
scr_ease_in
scr_ease_in

function
scr_ease_in(arg0, arg1)
{ if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_in_bounce(arg0, 0, 1, 1); case -2: return ease_in_elastic(arg0, 0, 1, 1); case -1: var _s = 1.70158; return arg0 * arg0 * (((_s + 1) * arg0) - _s); case 0: return arg0; case 1: return -cos(arg0 * 1.5707963267948966) + 1; case 6: return power(2, 10 * (arg0 - 1)); case 7: return -(sqrt(1 - sqr(arg0)) - 1); default: return power(arg0, arg1); } }
(aura / 45, 1);
46
    var aurayscale = min(80 / sprite_height, 1);
47
    draw_sprite_ext(sprite_index, walk_index, x - ((aurax / 180) * drawscale * sprite_width), y - ((auray / 82) * sprite_height * aurayscale), (image_xscale + (aurax / 36)) * drawscale, image_yscale + ((auray / 36) * aurayscale), image_angle, auracolor, image_alpha * (1 - (auray / 45)) * 0.5);
48
}
49
gpu_set_blendmode(bm_normal);
50
var xmult = min((70 / sprite_width) * 4, 4);
51
var ymult = min((80 / sprite_height) * 5, 5);
52
var ysmult = min((80 / sprite_height) * 0.2, 0.2);
53
draw_sprite_ext_centerscale(sprite_index, walk_index, xx + superdrawx + (sin(drawsiner / 5) * xmult), yy + (cos(drawsiner / 5) * ymult), image_xscale + superscalex, image_yscale + (sin(drawsiner / 5) * ysmult), image_angle, auracolor, image_alpha * 0.2);
54
draw_sprite_ext_centerscale(sprite_index, walk_index, (xx + superdrawx) - (sin(drawsiner / 5) * xmult), yy - (cos(drawsiner / 5) * ymult), image_xscale + superscalex, image_yscale - (sin(drawsiner / 5) * ysmult), image_angle, auracolor, image_alpha * 0.2);
55
scr_draw_outline_ext
scr_draw_outline_ext

function
scr_draw_outline_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
{ gpu_set_fog(true, arg7, 0, 0); var __xdirA = arg9; var __xdirB = 0; var __ydirA = 0; var __ydirB = arg9; if ((arg6 % 90) != 0) { __xdirA = lengthdir_x(arg9, arg6); __xdirB = lengthdir_x(arg9, arg6 + 90); __ydirA = lengthdir_y(arg9, arg6 + 90); __ydirB = lengthdir_y(arg9, arg6); } draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, arg6, c_white, arg8); draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, arg6, c_white, arg8); gpu_set_fog(false, c_white, 0, 0); }
(sprite_index, walk_index, xx, yy, image_xscale * drawscale, image_yscale, image_angle, auracolor, image_alpha * 0.3, 2);
56
draw_sprite_ext(sprite_index, walk_index, xx, yy, image_xscale * drawscale, image_yscale, image_angle, image_blend, image_alpha);
57
x = tempx;
58
mymidx = xx + (sprite_width / 2);
59
mymidy = yy + ((bbox_bottom - y) / 2);
60
if (freeze > 1 && freeze <= 20 && (freeze % 3) == 0)
61
    drawfreeze = 1 - drawfreeze;
62
if (freeze > 20)
63
    drawfreeze = true;
64
if (freeze <= 0)
65
{
66
    drawfreeze = false;
67
    auracolor = 255;
68
}
69
if (drawfreeze == true)
70
{
71
    auracolor = 12827470;
72
    draw_set_blend_mode(bm_add);
73
    draw_sprite_ext(sprite_index, walk_index, round(x / 2) * 2, round(y / 2) * 2, image_xscale, image_yscale, image_angle, image_blend, 1);
74
    draw_set_blend_mode(bm_normal);
75
}