Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_encounter_guei_alt_Draw_0

(view raw script w/o annotations or w/e)
1
with (obj_marker)
2
{
3
    if (variable_instance_exists(id, "extflag"))
4
    {
5
        if (extflag == "guei")
6
        {
7
            draw_sprite_ext(sprite_index, image_index, x, y, 2, 2, image_angle, image_blend, image_alpha);
8
            draw_sprite_ext(sprite_index, image_index + 0.5, x + (sin(image_index) * 4), y, 2, 2, image_angle, image_blend, image_alpha * 0.5);
9
            draw_sprite_ext(sprite_index, image_index + 0.9, x + (sin(image_index) * 8), y, 2, 2, image_angle, image_blend, image_alpha * 0.35);
10
        }
11
    }
12
}
13
with (chaser)
14
{
15
    if (other.con < 2)
16
    {
17
        var walk_index = image_index;
18
        var drawscale = image_yscale;
19
        var superdrawx = 0;
20
        var superscalex = 2;
21
        drawsiner++;
22
        gpu_set_blendmode(bm_add);
23
        for (var i = 0; i < 5; i++)
24
        {
25
            var aura = (i * 9) + ((drawsiner * 3) % 9);
26
            var aurax = (aura * 0.75) + (sin(aura / 4) * 4);
27
            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);
28
            var aurayscale = min(80 / sprite_height, 1);
29
            draw_sprite_ext(sprite_index, walk_index, x - ((aurax / 180) * sprite_width), y - ((auray / 82) * sprite_height * aurayscale), image_xscale + (aurax / 36), image_yscale + ((auray / 36) * aurayscale), image_angle, c_red, auraalpha * (alpha * (1 - (auray / 45)) * 0.5));
30
        }
31
        gpu_set_blendmode(bm_normal);
32
        var xmult = min((70 / sprite_width) * 4, 4);
33
        var ymult = min((80 / sprite_height) * 5, 5);
34
        var ysmult = min((80 / sprite_height) * 0.2, 0.2);
35
        draw_sprite_ext_centerscale(sprite_index, walk_index, x + (sin(drawsiner / 5) * xmult), y + (cos(drawsiner / 5) * ymult), image_xscale, image_yscale + (sin(drawsiner / 5) * ysmult), image_angle, 255, auraalpha * alpha * 0.2);
36
        draw_sprite_ext_centerscale(sprite_index, walk_index, x - (sin(drawsiner / 5) * xmult), y - (cos(drawsiner / 5) * ymult), image_xscale, image_yscale - (sin(drawsiner / 5) * ysmult), image_angle, 255, auraalpha * alpha * 0.2);
37
        
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, x, y, image_xscale, image_yscale, image_angle, c_red, auraalpha * alpha * 0.3, 2);
38
        draw_sprite_ext(sprite_index, walk_index, x, y, image_xscale, image_yscale, image_angle, image_blend, alpha);
39
        mymidx = x + (sprite_width / 2);
40
        mymidy = y + ((bbox_bottom - y) / 2);
41
        draw_sprite_ext(spr_guei_chase, image_index, x, y, 2, 2, image_angle, image_blend, alpha);
42
        draw_sprite_ext(spr_guei_chase, image_index + 0.5, x + (sin(image_index) * 4), y, 2, 2, image_angle, image_blend, alpha * 0.5);
43
        draw_sprite_ext(spr_guei_chase, image_index + 0.9, x + (sin(image_index) * 8), y, 2, 2, image_angle, image_blend, alpha * 0.35);
44
    }
45
    else
46
    {
47
        var prog = clamp(other.btimer / 20, 0, 1);
48
        sprite_index = spr_guei_idle_nowisp;
49
        draw_sprite_ext(sprite_index, other.siner / 4, x - (60 * (1 - prog)), y - (80 * (1 - prog)), 2, 2, 0, c_white, prog * 4);
50
    }
51
    draw_set_color(c_red);
52
    var _xloc = (x + 16) - 30;
53
    var _yloc = ((y + 30) - 44) + 12;
54
    draw_set_color(c_white);
55
}