Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_skewed_sprite_speciall_Draw_0

(view raw script w/o annotations or w/e)
1
if (kq == 1)
2
{
3
    draw_sprite_skew_ext_cute(sprite_index, image_index, x + ((12 * hskew) / 20), y, image_xscale, image_yscale, image_angle, 4210752, image_alpha, hskew, vskew);
4
    draw_sprite_skew_ext_cute(sprite_index, image_index, x + ((6 * hskew) / 20), y, image_xscale, image_yscale, image_angle, 8421504, image_alpha, hskew, vskew);
5
}
6
draw_sprite_skew_ext_cute(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha, hskew, vskew);
7
draw_set_color(c_black);
8
draw_text(x + 10, y + 10, string_hash_to_newline("h: " + string(hskew) + "#v: " + string(vskew) + "rot: " + string(image_angle)));
9
timer++;
10
if (auto == 1 || auto == 2)
11
{
12
    if (timer == 8)
13
    {
14
        if (auto == 1)
15
        {
16
            hskew = random_range(-50, 50);
17
            vskew = random_range(-20, 20);
18
        }
19
        if (auto == 2)
20
        {
21
            image_speed = 0;
22
            image_index++;
23
            idealhskew = random_range(-50, 50);
24
            idealvskew = random_range(-20, 20);
25
        }
26
        timer = 0;
27
    }
28
    if (auto == 2)
29
    {
30
        hskew = lerp(hskew, idealhskew, 0.5);
31
        vskew = lerp(vskew, idealvskew, 0.5);
32
    }
33
}