Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_organ_enemy_Draw_0

(view raw script w/o annotations or w/e)
1
scr_enemy_drawhurt_generic
scr_enemy_drawhurt_generic

function
scr_enemy_drawhurt_generic()
{ if (state == 3 && hurttimer >= 0) draw_sprite_ext(hurtsprite, 0, x + shakex + hurtspriteoffx, y + hurtspriteoffy, 2, 2, 0, image_blend, 1); }
();
2
if (state == 0)
3
{
4
    fsiner += 1;
5
    siner2 += 0.16666666666666666;
6
    siner += clamp(0.25 + (sin(siner2 / 6) * 0.3), 0, 0.5);
7
    thissprite = idlesprite;
8
    if (global.mercymod[myself] >= global.mercymax[myself] && global.turntimer < 1)
9
        thissprite = sparedsprite;
10
    draw_monster_body_part(thissprite, siner, x, y);
11
    if (thissprite == idlesprite)
12
        draw_monster_body_part(spr_organik_head, siner, x, y);
13
    if (thissprite != sparedsprite)
14
        x = xstart + (sin(siner2 / 1.5) * 3);
15
}
16
if (becomeflash == 0)
17
    flash = 0;
18
becomeflash = 0;
19
if (harmonize_highlight > 0)
20
{
21
    harmonize_highlight--;
22
    if (!i_ex(obj_organ_enemy_highlight))
23
    {
24
        instance_create(x + 58, y + 136, obj_organ_enemy_highlight);
25
        obj_organ_enemy_highlight.depth = depth - 2;
26
    }
27
    else
28
    {
29
        obj_organ_enemy_highlight.alarm[0] = 2;
30
    }
31
    particletimer++;
32
    if (particletimer >= 1)
33
    {
34
        part = instance_create(x + 8 + random(60), y + 117, obj_organ_enemy_particle);
35
        part.depth = depth - 1;
36
        particletimer = 0;
37
    }
38
}