Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_halo_bat_aim_Draw_0

(view raw script w/o annotations or w/e)
1
siner += 1;
2
if (i_ex(obj_heart))
3
{
4
    var eyeangle = point_direction(x, y, obj_heart.x + 10, obj_heart.y + 10);
5
    targetEyeX = lengthdir_x(6, eyeangle);
6
    targetEyeY = lengthdir_y(6, eyeangle);
7
}
8
eyex = lerp(eyex, targetEyeX, 0.2);
9
eyey = lerp(eyey, targetEyeY, 0.2);
10
draw_sprite_ext(spr_halo_bat_sword, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
11
draw_sprite_ext(spr_halo_bat_topBit, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
12
draw_sprite_ext(spr_halo_bat_leftWing_animated, siner * 0.25, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
13
draw_sprite_ext(spr_halo_bat_rightWing_animated, siner * 0.25, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
14
draw_sprite_ext(spr_halo_bat_black, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
15
draw_sprite_ext(spr_halo_bat_eyeWhite, 0, x + round(eyex * 0.2), y + round(eyey * 0.2), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
16
draw_sprite_ext(spr_halo_bat_eyePupil, 0, x + round(eyex), y + round(eyey), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
17
draw_sprite_ext(spr_halo_bat_halo, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
18
if (greenflash > 0)
19
{
20
    flashsiner += flashspeed;
21
    d3d_set_fog(true, c_lime, 0, 1);
22
    draw_sprite_ext(spr_halo_bat_sword, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, sin(flashsiner / 3));
23
    draw_sprite_ext(spr_halo_bat_topBit, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, sin(flashsiner / 3));
24
    draw_sprite_ext(spr_halo_bat_leftWing_animated, siner * 0.25, x, y, image_xscale, image_yscale, image_angle, image_blend, sin(flashsiner / 3));
25
    draw_sprite_ext(spr_halo_bat_rightWing_animated, siner * 0.25, x, y, image_xscale, image_yscale, image_angle, image_blend, sin(flashsiner / 3));
26
    draw_sprite_ext(spr_halo_bat_black, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, sin(flashsiner / 3));
27
    draw_sprite_ext(spr_halo_bat_eyeWhite, 0, x + round(eyex * 0.2), y + round(eyey * 0.2), image_xscale, image_yscale, image_angle, image_blend, sin(flashsiner / 3));
28
    draw_sprite_ext(spr_halo_bat_eyePupil, 0, x + round(eyex), y + round(eyey), image_xscale, image_yscale, image_angle, image_blend, sin(flashsiner / 3));
29
    draw_sprite_ext(spr_halo_bat_halo, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, sin(flashsiner / 3));
30
    d3d_set_fog(false, c_black, 0, 0);
31
    if (flashsiner > 4 && sin(flashsiner / 3) < 0)
32
    {
33
        greenflash = 0;
34
        flashsiner = 0;
35
    }
36
}