Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_caterpillar_dash_Draw_0

(view raw script w/o annotations or w/e)
1
var _x = x + (lengthdir_x(shake, shake_angle) * 2);
2
var _y = y + (lengthdir_y(shake, shake_angle) * 2);
3
if (jumping)
4
{
5
    var xx = x + (20 * sign(image_xscale));
6
    _y -= jumppos;
7
    draw_set_color(c_black);
8
    var _radius = max(0, lerp(40, 0, jumppos / 120));
9
    var _x1 = xx - lengthdir_x(_radius, 45);
10
    var _y1 = 20 + y + (lengthdir_y(_radius, 45) * 0.4);
11
    var _x2 = xx + lengthdir_x(_radius, 315);
12
    var _y2 = 20 + y + (lengthdir_y(_radius, 315) * 0.4);
13
    if (!i_ex(obj_sunshadows))
14
        draw_ellipse(_x1, _y1, _x2, _y2, 0);
15
}
16
draw_sprite_ext(sprite_index, image_index, _x, _y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
17
if (spawn_water_splash)
18
    draw_sprite_ext(spr_dash_splash, current_time / 50, x - (12 * image_xscale), y + 42, image_xscale, image_yscale, 0, c_white, 1);
19
if (spawn_water_splash)
20
{
21
    if (spawn_water_splash == 1)
22
        draw_sprite_ext(spr_dash_splash, current_time / 50, x - (12 * image_xscale), y + 42, image_xscale, image_yscale, 0, c_white, 1);
23
    else
24
        draw_sprite_ext(spr_dash_splash_dark, current_time / 50, x - (12 * image_xscale), y + 42, image_xscale, image_yscale, 0, c_white, 1);
25
}