Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_krisandralsei_Draw_0

(view raw script w/o annotations or w/e)
1
with (obj_susiezilla_gamecontroller)
2
{
3
    if (!gameover)
4
    {
5
        other.targy = 65 + ((obj_susiezilla_player.y - 220) / 8) + ((down_h() - up_h()) * 12);
6
        other.targx = (obj_susiezilla_player.x + (width * 0.5)) / 2;
7
        other.y = lerp(other.y, other.targy, 0.25);
8
        other.x = lerp(other.x, other.targx, 0.25);
9
        other.xspeed = other.x - other.xprevious;
10
        other.heave_to = lerp(other.heave_to, (right_h() - left_h()) * 12, 0.25);
11
    }
12
}
13
if (xspeed >= 7)
14
    image_index = 4;
15
else if (xspeed >= 4)
16
    image_index = 3;
17
else if (xspeed > -4)
18
    image_index = 2;
19
else if (xspeed > -7)
20
    image_index = 1;
21
else
22
    image_index = 0;
23
image_alpha = 1;
24
image_blend = c_gray;
25
with (obj_susiezilla_gamecontroller)
26
    draw_sprite_ext(spr_susiezilla_background_backstage, 0, xorig - bgxoffset, 0, 2, 2, 0, image_blend, image_alpha);
27
if (i_ex(obj_tenna_enemy))
28
    draw_sprite_ext(spr_pixel_white, 0, camerax(), cameray(), camerawidth(), 64, 0, c_black, 1);
29
var offs = 0;
30
if (image_index == 1)
31
    offs = -4;
32
if (image_index == 0)
33
    offs = -8;
34
if (image_index == 3)
35
    offs = 12;
36
if (image_index == 4)
37
    offs = 16;
38
if (sprite_index == spr_susiezilla_kris_tug && starwalker)
39
    draw_sprite_ext(spr_npc_originalstarwalker, 0, ((round((x + heave_to) / 2) * 2) - 56) + offs, (round(y / 2) * 2) - 24, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
40
draw_sprite_ext(sprite_index, image_index, round((x + heave_to) / 2) * 2, round(y / 2) * 2, image_xscale, image_yscale, image_angle, image_blend, image_alpha);